Skip to content

fix: modal layout shift for none overlay scrollbar - #1868

Open
Legend-Master wants to merge 2 commits into
algolia:mainfrom
Legend-Master:fix/modal-layout-shift
Open

fix: modal layout shift for none overlay scrollbar#1868
Legend-Master wants to merge 2 commits into
algolia:mainfrom
Legend-Master:fix/modal-layout-shift

Conversation

@Legend-Master

Copy link
Copy Markdown

The current way of preventing scrolling will hide the scrollbar and causing a layout shift when using a none overlay scrollbar (default on windows)

image
image

I can only think of two ways to handle this, but they all cause a pretty small layout shift on sticky elements (1px)

  • Make a padding to the right to fill up the missing scrollbar space
  • Set body position fixed and change the z index

But to be honest, I would prefer not to do it at all, able to scroll the things behind the searching UI is not a big problem comparison to a layout shift to me

@netlify

netlify Bot commented Apr 22, 2023

Copy link
Copy Markdown

‼️ Deploy request for docsearch rejected.

Name Link
🔨 Latest commit 4b64ecc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant