-
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
Link Format: Don't return focus on the selected text 'onFocusOutside' #51684
Conversation
Size Change: +19 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
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. Test failure will be due to tab stops. Bear in mind we are refactoring away from these tests towards Playwright so this type of failure will become less of a problem in future.
Thank you, @getdave!
Does this fail occasionally, or do I need to adjust anything in the tests?
That would be a considerable improvement. Playwright DX is fantastic! |
I think it will need a tab stop count adjustment. The tests rely way too much on tabbing order. |
649b31a
to
eadf836
Compare
I adjusted the e2e test. The previous behavior relied on focus return behavior. |
Flaky tests detected in eadf836. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5321172958
|
…WordPress#51684) * Link Format: Don't return focus on the selected text 'onFocusOutside' * Update e2e tests
What?
Fixes #51646.
Do not return focus to the selected text when the Link format inline popover is closed by focusing outside. Fixes a bug with the main block inserter closing because of focus change.
Why?
The
onFocusOutside
event can be interpreted as the user's intention to move focus to another element.How?
stopAddingLink
to manage focus returns.onFocusOutside
handler for the popover.Testing Instructions
Screenshots or screencast
CleanShot.2023-06-20.at.12.25.25.mp4