-
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 being unable to switch modes while inserter is open #61563
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +13 B (0%) Total Size: 1.74 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.
This works. The only thing I noticed is that now when I open the inserter the global styles sidebar closes, but in some ways that is useful!
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.
@jeryj This is almost testing perfectly. This might be a new bug so feel free to address in another issue/PR.
- Open the inserter.
- Insert a paragraph block.
- Type some text.
- Press Escape to enter navigation mode.
- Press Enter to resume editing.
- Notice how there is now a focus loss, rich text paragraph field does not regain focus.
- Pressing Tab again lands on the paragraph block toolbar.
Tested in Firefox on Windows.
@alexstine I did your reproduction steps on Chrome and in Firefox on Mac in both the post editor and site editor and couldn't reproduce. Could you try again on trunk now that this is merged and see if it's still an issue? It's possible it was unrelated and got fixed on trunk. |
@jeryj I just built off latest trunk and can still replicate. I can also no longer tab out of the inserter panel. Did this PR get reverted? |
Bug reported by @alexstine
What?
Fixes a bug where when the inserter was open, you could not switch modes. This was due to the useZoomOut hook switching modes.
Why?
Fix being unable to switch modes while inserter is open.
How?
Adds a check to only switch away from 'zoom-out' mode if we are indeed in zoom out mode.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast