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

Call preventDefault() in "Esc" event listener #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgeier
Copy link

@mgeier mgeier commented Jan 17, 2022

This is untested, but it should prevent the keypress to be propagated after closing the popup, which is not desired, e.g. in sphinx-doc/sphinx#9337.

@stsewd
Copy link
Member

stsewd commented Mar 7, 2022

Hi, sorry for the late review, I just hit this, but this doesn't fix the issue, I think we may need to narrow down the listener (currently set to the whole document), or may be another way to achieve this?

stsewd added a commit that referenced this pull request Mar 7, 2022
Two things:

- The scope of the event needs to be narrowed down
  (from document to just the modal).
- We need to call stopPropagation so the event isn't triggered for the
  document object.

Closes #103
@stsewd
Copy link
Member

stsewd commented Mar 7, 2022

This kind of works #104

stsewd added a commit that referenced this pull request Apr 5, 2022
Two things:

- The scope of the event needs to be narrowed down
  (from document to just the modal).
- We need to call stopPropagation so the event isn't triggered for the
  document object.

Closes #103
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 this pull request may close these issues.

2 participants