WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

Zoom out: Pattern inserter always forces iframe editor #66671

Open t-hamano opened 19 hours ago

t-hamano commented 19 hours ago

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.