-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Allow keydown events to propagate if Dropdown is closed #15065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The modal scenario you described works fine for me: http://jsbin.com/gatuho/1/quiet |
You are right, I have to make description more clear: I can catch an event on parent elements (like modal), but I can not do it on |
Hi @dunal! You appear to have posted a live example (http://fiddle.jshell.net/t22ev68q/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:
You'll need to fix these errors and post a revised example before we can proceed further. (Please note that this is a fully automated comment.) |
Do you have an example that doesn't involve the third-party bootstrap-select library? |
Yes, here http://jsfiddle.net/t22ev68q/2/ i used a snippet from bootstrap docs, just added |
You need to use an anchor instead of a button to make it focusable in all browsers; see the docs example. |
Tweaked example: http://jsfiddle.net/ku4vqp2y/7/show/ Well, the Up/Down keys in that case open the menu if it's closed, so that seems like reasonable+intentional behavior. I agree that preventing the propagation of Esc when the menu is closed is kinda weird though. |
Bootstrap 3 is no longer being officially developed or supported. All work has moved onto our next major release, v4. As such, this issue or pull request is being closed as a "won't fix." For additional help and support, we recommend utilizing our community resources. Thanks for your understanding, and see you on the other side of v4! <3, |
When element with
data-toggle="dropdown"
is focused,keydown
events could not be cought on parent elements. For example, it's impossible to close containing modal byesc
.It would be better to prevent event propagation only if dropdown is open.
The text was updated successfully, but these errors were encountered: