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

The whole page shifts when the sidebar gets a scrollbar #45386

Closed
corentin-gautier opened this issue Oct 28, 2022 · 0 comments · Fixed by #47177
Closed

The whole page shifts when the sidebar gets a scrollbar #45386

corentin-gautier opened this issue Oct 28, 2022 · 0 comments · Fixed by #47177
Assignees
Labels
[Package] Interface /packages/interface [Type] Enhancement A suggestion for improvement.

Comments

@corentin-gautier
Copy link
Contributor

corentin-gautier commented Oct 28, 2022

Description

When selecting blocks, if the right sidebar doesn't have a scrollbar then suddenly gets one, the whole page shifts to the left, triggering repaint all over the place,

This could be fixed by having an overflow-y: scroll instead of an overflow: auto on the sidebar

Here's an example of the code I have currently to fix this:

// Avoid layout shift on block selection
.interface-interface-skeleton__sidebar:has(.interface-complementary-area) {
  overflow-y: scroll;
}

The issue comes from the fact that the sidebar content width is set to 280px and the sidebar width is set to auto with an overflow auto.

Step-by-step reproduction instructions

  1. Go to https://wordpress.org/gutenberg/
  2. Select the "Say Hello ..." title block
  3. Select the "Try Gutenberg today in WordPress" button

Screenshots, screen recording, code snippet

Screen.Recording.2022-10-28.at.16.00.04.mov

Environment info

  • on a screen high enough that sometimes the sidebar content doesn't overflow

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

Related to #23427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Interface /packages/interface [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants