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

Triggering side panel with overlay causes panel to open and close via keyboard #1117

Open
oscarkwan opened this issue Aug 10, 2021 · 0 comments
Labels
Editor's Choice Highlight an issue as something that would be great to be solve High Priority ↑ This issue needs attention asap

Comments

@oscarkwan
Copy link
Contributor

Bug Report

Expected behavior

  1. When triggering a sidepanel (with overlay) with any type of button, it should open and close correctly.

Current behavior

  1. When triggering a sidepanel (with overlay) with a semantic button (). It opens the panel and immediately closes. This is because the sidepanel steals the focus to the (x button) and on the "onKeyUp" event it triggers the X and closes the panel. Therefore you can never open the panel with the keyboard. See sandbox below for more information.

Workaround

Use non-semantic version of the button component

Screenshots / Gifs / Codepens

https://codesandbox.io/s/sidepanel-issue-6ertl

@oscarkwan oscarkwan added High Priority ↑ This issue needs attention asap Editor's Choice Highlight an issue as something that would be great to be solve labels Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor's Choice Highlight an issue as something that would be great to be solve High Priority ↑ This issue needs attention asap
Projects
None yet
Development

No branches or pull requests

1 participant