WordPress / gutenberg

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

Site Editor: Canvas width glitch when selecting 'Browse Styles' then closing inserter sidebar #65080

Open talldan opened 3 weeks ago

talldan commented 3 weeks ago

Step-by-step reproduction instructions

  1. Open the Site Editor and edit a page
  2. Select the + button on the top bar to open the Inserter sidebar
  3. Select the Styles button on the top bar to open the global styles sidebar
  4. Select 'Browse Styles' in the global styles sidebar, observe the canvas zooms out
  5. Now close the Inserter sidebar, observe that the canvas looks unusual with scrollbars moved into the middle of the viewport

If you compare this to engaging and disengaging 'Browse styles' without the inserter sidebar open, you'll see that it looks completely different, the scrollbars stay at the edge of the screen.

Screenshots, screen recording, code snippet

https://github.com/user-attachments/assets/1ce5135e-2b64-4acc-9574-50d6f8529b7f

Environment info

Brave / Mac OS Latest Gutenberg trunk

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

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

stokesman commented 1 week ago

Here’s latest trunk showing the same with the newer toggle button (and in the Post editor):

https://github.com/user-attachments/assets/b49ee030-bb56-44b9-80a4-da5e5d8a7c71

That button seems like it will increase exposure to this bug.


#63390 under the same scenarios https://github.com/user-attachments/assets/0aee720b-6bad-4cc0-98bf-9a603fbe703e