WordPress / gutenberg

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

Shaking effect from scrollbar appearing/disappearing when switching styles in some themes/browsers #59998

Open jeryj opened 7 months ago

jeryj commented 7 months ago

Description

Originally reported in trac by @kjnanda: https://core.trac.wordpress.org/ticket/60616

Debugged by @Rcreators:

As discussion on accessibility bug scrub today. We found the issue. When we change the style, page recalculate the hight and add scrollbar to it. For some styles, it gets removed and for some it removes but blank area stays. For reference check the this link: http://somup.com/cZeqoHC6mn The scrollbar needs to be removed for all the styles. https://core.trac.wordpress.org/ticket/60616#comment:6

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

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

sabernhardt commented 7 months ago

If it does not occur the first time you switch to a style, try resizing the browser window. It seems to flash at a viewport width where some text wraps on the next line with a scrollbar present but does not wrap when the preview lacks a scrollbar.

I was able to experience the scrollbar flashing with each of Twenty Twenty-Four's style options at various browser widths in Chrome and Edge on Windows 10. The video below records it in Edge, and I use the reduced motion setting (it occurs with animations on or off). https://github.com/WordPress/gutenberg/assets/17100257/c9ee1368-ec29-4fcd-b147-bb76c3416c24

The widths at which this video shows the flash are

The preview could always show the scrollbar instead of trying to remove it in all cases.