Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block editor: unwanted scroll bar while loading. #67360

Closed
3 of 6 tasks
matiasbenedetto opened this issue Nov 27, 2024 · 2 comments · Fixed by #67536
Closed
3 of 6 tasks

Block editor: unwanted scroll bar while loading. #67360

matiasbenedetto opened this issue Nov 27, 2024 · 2 comments · Fixed by #67536
Assignees
Labels
[Feature] Zoom Out [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@matiasbenedetto
Copy link
Contributor

Description

On load time the block editor displays an unwanted scroll bar. Please take a look at the screenshot below.

I'm tagging this issue with zoom-out tag because this seems to be the result of the changes introduced in #67126

Specifically this line:

// Force preserving a scrollbar gutter as scrollbar-gutter isn't supported in all browsers yet,
// and removing the scrollbar causes the content to shift.
overflow-y: scroll;

Step-by-step reproduction instructions

  1. Use Gutenberg trunk and TT5 theme.
  2. Browse theme style variations in the sidebar.
  3. Observe the unwanted scroll bars while the block editors are loading

Screenshots, screen recording, code snippet

Image

Environment info

  • WordPress 6.7.1
  • Gutenberg trunk

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
@t-hamano
Copy link
Contributor

t-hamano commented Dec 2, 2024

I'm wondering why the theme style preview or palette preview even needs zoom-out related CSS class names or variables 🤔

Image

cc @jeryj @draganescu @ajlende

@jeryj
Copy link
Contributor

jeryj commented Dec 2, 2024

I think this should be fixed by #67495 and #67496

Ah, never mind. I think this is due to the animation assuming the resulting canvas will have a scrollbar. If the height of the content is less than the frame, we won't want to force a scrollbar.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants