Skip to content

Zoom state and button remain active after responsive changes #69086

@Infinite-Null

Description

@Infinite-Null

Description

The zoom state in the editor doesn't properly reset when the component unmounts, causing the zoom state to persist unexpectedly across editor sessions and responsive view changes.

Step-by-step reproduction instructions

  1. Open the WordPress block editor
  2. Click the zoom out button to activate zoom
  3. Resize the browser window to a smaller width
  4. Resize the browser window back to larger width
  5. Observe that the zoom visual effect is lost but the button remains in a "pressed" state

Screenshots, screen recording, code snippet

Screen.Recording.2025-02-07.at.12.10.49.PM.mov

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions