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

Dropdowns: key events are not propagated from inactive and disabled dropdowns #30510

Open
luktom opened this issue Apr 3, 2020 · 1 comment
Labels

Comments

@luktom
Copy link

luktom commented Apr 3, 2020

Hi,

key events are not propagated from dropdown when it is inactive or disabled.

Reduced test case on JS Bin: https://jsbin.com/hoharusisa there is ESC key handler attached to the document element.

  1. Click on ESC - nothing happens.
  2. Click on ESC - handler is invoked.

Event propagation is disabled in the https://github.com/twbs/bootstrap/blob/v4-dev/js/src/dropdown.js#L455 just after initial checks which are finishing the event handling, but in following lines there are further check which potentially could finish the handling. Propagation should be stopped after those checks.

Please see related PR with the fix.

Similar finding was created for v3: #15065 It was found as valid issue: #15065 (comment) however it was never fixed.

Thanks ans Regards,
Łukasz

@luktom
Copy link
Author

luktom commented Apr 7, 2020

PR to master can be find here: #30529, please see #30529 (comment) Backport of #28912 from v4 to v5 was needed.

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

Successfully merging a pull request may close this issue.

2 participants