Skip to content
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

Modal not closing on Esc #6180

Closed
elado opened this issue Dec 9, 2012 · 2 comments
Closed

Modal not closing on Esc #6180

elado opened this issue Dec 9, 2012 · 2 comments
Labels

Comments

@elado
Copy link

elado commented Dec 9, 2012

Version: 2.2.2.

The Modal#escape function binds an event to $this.element, and unless there's focused element in a modal, it doesn't become activeElement and the keyup event doesn't fire.

Also, when there's no backdrop, and activeElement is outside of the modal, esc doesn't work either.

Event should be on the body instead.

Example: http://jsfiddle.net/elado/3su2V/

@PetrP
Copy link

PetrP commented Feb 6, 2013

Add tabindex="-1" to modal div.

http://jsfiddle.net/3su2V/2/

@fat
Copy link
Member

fat commented Feb 8, 2013

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants