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 traps keydown event for esc key for the whole document #2312

Closed
jeffhem opened this issue Apr 16, 2019 · 2 comments · Fixed by #2313 or #2368
Closed

Modal traps keydown event for esc key for the whole document #2312

jeffhem opened this issue Apr 16, 2019 · 2 comments · Fixed by #2313 or #2368

Comments

@jeffhem
Copy link

jeffhem commented Apr 16, 2019

Detailed description

Other elements are not able to add keydown event for the escape key

The keydown event should not add to the document level and stop it from propagating

Steps to reproduce the issue

Add a event listener for the escape keydown event to any element in the document, and it's not response to the escape key

Additional information

the line of code doing that
https://github.com/IBM/carbon-components/blob/master/src/components/modal/modal.js#L139

@jeffhem
Copy link
Author

jeffhem commented Apr 16, 2019

Update: The event listener was attached to the document

image

@flannanl
Copy link

@asudoh Can you port this change to v9? I think we still have a long way to move to v10.

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

Successfully merging a pull request may close this issue.

2 participants