Activate a plugin that includes the v2 block (e.g. CoBlocks).
Open the post editor.
The editor should be running as a non-iframe.
Enable custom fields and refresh your browser. Ensure the meta box is legacy (not resizable).
Select the Patterns tab from the main inserter.
🤔 You should see the zoom out toggle button in the header.
🤔 The meta box should change to resizable.
Click the zoom out toggle button in the header.
🤔 The zoom out button should disappear.
🤔 The meta box should change to legacy.
What is your proposed solution?
Here are my suggested approach for the non-iframe editor:
For WP 6.7: Don't enable zoom out mode when accessing the Patterns tab.
For Gutenberg (WP 6.8): Enable zoom out mode in the non-iframe editor, i.e. displays the zoom out toggle button in the header and also provides the zoom out shortcut.
Description
When the Patterns tab is selected, the zoom out mode is enabled via the
useZoomOut
hook and the editor behaves as an iframe. On the other hand, if the editor is NOT an iframe, the zoom out toggle is not displayed (https://github.com/WordPress/gutenberg/pull/65452).This inconsistency leads to unintended behavior.
Step-by-step reproduction instructions
To make the
useShouldIframe
hook return false, do the following:What is your proposed solution?
Here are my suggested approach for the non-iframe editor:
Screenshots, screen recording, code snippet
https://github.com/user-attachments/assets/5c345b3a-54d9-4fa7-ac71-25a76c86e38a
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.