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

fix(SideBarPopup): close sidebarPopup on ESC keypress #6315

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nileshgulia1
Copy link
Member

As an extension of #2509 (comment)
The problem with block losing focus on ESC was originating from


The solution was to intercept the event by making <aside> focusable. Since non-interactive elements should not be made focusable, therefore added tabIndex={-1}.

Copy link

netlify bot commented Sep 24, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit bc62d96
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66f8f808716eb00008850213

@nileshgulia1
Copy link
Member Author

nileshgulia1 commented Sep 24, 2024

Edit: I think introducing focus was a smell, I modified using intercepting event conditionally.

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.

1 participant