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

CustomSelectControl does not prevent keypress events from bubbling up #30204

Closed
opr opened this issue Mar 24, 2021 · 0 comments · Fixed by #30557
Closed

CustomSelectControl does not prevent keypress events from bubbling up #30204

opr opened this issue Mar 24, 2021 · 0 comments · Fixed by #30557
Assignees
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@opr
Copy link
Contributor

opr commented Mar 24, 2021

Description

When you click a CustomSelectControl and start typing to move to an item, the event is not cancelled.
This may be related to downshift (potentially relevant PR there, though this is from some time ago: downshift-js/downshift#633)

Step-by-step reproduction instructions

  1. Open the storybook for this project: npm run storybook:dev
  2. Go to the CustomSelectControl > Default component, click it and start typing s to get to the entry Small
  3. Notice the storybook sidebar has closed, due to the s keypress not being cancelled.

Expected behaviour

Keypress events when using the CustomSelectControl should be cancelled before they are handled by other listeners.

Actual behaviour

Keypress events when using the CustomSelectControl are not cancelled before they are handled by other listeners.

Screenshots or screen recording (optional)

https://www.loom.com/share/bbff71315911464c884c15ae8fbf6618

WordPress information

  • WordPress version: n/a
  • Gutenberg version: trunk
  • Are all plugins except Gutenberg deactivated? n/a
  • Are you using a default theme (e.g. Twenty Twenty-One)? n/a

Device information

  • Device: Desktop
  • Operating system: Mac OS Big Sur
  • Browser: Brave Version 1.20.110 Chromium: 88.0.4324.192 (Official Build) (x86_64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants