This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Pressing ESC with a dropdown inside a modal dialog #5778
Comments
Since esc closes typeahead and dropdowns I would argue both should behave the same way. If making a PR to fix for dropdown, please make sure typeahead works the same way. |
Marking as a breaking change, but the side-effects should be minimal, if it affects anyone at all. Looks like we do close a dropdown on escape, so it makes sense to stop the event propagation. |
@deeg good call, I agree typeahead should work the same way - in fact it already works the way I think the dropdown should work. It stops event propagation so that ESC only closes the typeahead dropdown not the dialog as well. I created a plunkr to test it out: |
deeg
added a commit
to deeg/bootstrap
that referenced
this issue
Apr 12, 2016
Fixes angular-ui#5778 BREAKING CHANGE: Stops propagation of keydown event when escape key is pressed. Removes keydown event from the document and moves it to the dropdown element.
deeg
added a commit
to deeg/bootstrap
that referenced
this issue
Apr 12, 2016
Fixes angular-ui#5778 Closes angular-ui#5787 BREAKING CHANGE: Stops propagation of keydown event when escape key is pressed. Removes keydown event from the document and moves it to the dropdown element.
deeg
added a commit
to deeg/bootstrap
that referenced
this issue
Apr 12, 2016
Fixes angular-ui#5778 Closes angular-ui#5787 BREAKING CHANGE: Stops propagation of keydown event when escape key is pressed. Removes keydown event from the document and moves it to the dropdown element.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug description:
If I have a dropdown widget inside a modal dialog and the dropdown is open, and then I press Escape, it closes the dialog. I would expect pressing Escape to close the dropdown only and not the dialog as well. If the dropdown is closed, pressing Escape would then close the dialog. Could this be addressed by calling evt.stopPropagation() when handling the escape key in dropdown.js?
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/T2gDRud9wpg8XpbLu3Yc?p=preview
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.3
UIBS: 1.3.1
Bootstrap: 3.3.6
The text was updated successfully, but these errors were encountered: