-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 block style preview flickering when a 'style' is focused #48418
Conversation
Size Change: +3 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in a8eb773. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4263318719
|
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.
LGTM👍 It works as expected. Since this popover has no focusable elements, I think the approach makes sense. Thank you!
What?
Fixes: #48320
In this PR the implementation changed to use
Popover
. When we focused a button in styles through keyboard, it would move the focus to the Popover, therefore triggering theonBlur
callback. This would result in the disappearance of the style preview.This PR fixes that, by not moving the focus to the Popover.
Testing Instructions
Before
Screen.Recording.2023-02-24.at.4.22.12.PM.mov
After
Screen.Recording.2023-02-24.at.4.19.42.PM.mov