-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 combobox suggestion list closure when clicking scrollbar #27367
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
talldan
added
[Feature] UI Components
Impacts or related to the UI component system
[Type] Regression
Related to a regression in the latest release
labels
Nov 30, 2020
Size Change: +59 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
tellthemachines
approved these changes
Dec 1, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! It's working well; I also tested keyboard navigation as well as screen reader interaction on VoiceOver and NVDA and nothing seems broken.
tellthemachines
added
the
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
label
Dec 1, 2020
tellthemachines
pushed a commit
that referenced
this pull request
Dec 1, 2020
tellthemachines
added a commit
that referenced
this pull request
Dec 1, 2020
* Provide a minimum of code wrapping for the code block. (#26623) * Block Support: Fix font size style when applying block support (#26762) * Fix Separator editor styles (#27071) * Fix the Post author selector for contributors (#26554) Co-authored-by: Riad Benguella <[email protected]> * Align single half width column to left (#27142) * remove the auto margin for individual column blocks * update margin values for blocks in blocks to zero insted of auto * Add backward compatibility support for lightBlockWrapper in getSaveElement (#27189) * Code block: paste plain text (#27236) * paste plain text option * Add e2e test * Fix crash when null date passed to TimePicker (#27316) * Fix crash when null date passed. * Update test * Fix GH actions "cancel" step (#27025) * use new syntax for setting env var * Update package-lock * Update package-lock again * Remove the button only option from the UI until it can be wired up to something that works in the front end. (#27379) * Fix combobox csuggestion list closure when clicking scrollbar (#27367) Co-authored-by: Joen A <[email protected]> Co-authored-by: Aaron Robertshaw <[email protected]> Co-authored-by: Nik Tsekouras <[email protected]> Co-authored-by: Adam Silverstein <[email protected]> Co-authored-by: Riad Benguella <[email protected]> Co-authored-by: andrei draganescu <[email protected]> Co-authored-by: Daniel Richards <[email protected]> Co-authored-by: Ella van Durpe <[email protected]> Co-authored-by: Noah Allen <[email protected]> Co-authored-by: Andy Peatling <[email protected]>
tellthemachines
removed
the
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
label
Dec 1, 2020
6 tasks
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
[Type] Regression
Related to a regression in the latest release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
First attempt at fixing #27283.
The bug is caused by ComboxBoxControl hiding the suggestions list whenever its input is blurred, e.g. when clicking on something in the suggestions list, a sibling HTML element.
This PR uses
withFocusOutside
to check for blur of the entire control rather than just the input.The downside of
withFocusOutside
is that it adds an extra wrapping div around the component, which is kind of nasty. But in testing didn't seem to cause any styling issues.I've separately looked at refactoring
withFocusOutside
to a hook (#27369) so that we can lose the wrapping div, which I've had some success with, but this would then require lots of changes to BaseControl to accept various event handler props from the hook. Quite a big change for a backport to a WordPress 5.6 release candidate.How has this been tested?
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: