Skip to content

scrollbar layout shift with dialog, dropdownmenu, etc #1100

Answered by benoitgrelard
rtkaaho asked this question in Help
Discussion options

You must be logged in to vote

Hey @rtkaaho,

It is actually due to removing the scroll, rather than pointer events.
Under the hood, we use a library called react-remove-scroll which exposes some classes to use to mitigate this.

If you look at our docs code, you'll see some examples of how we use this in places.

Worth looking at also, the lib itself.
It is itself built on top of a more generic one, where you can see the constants exported.

I hope that helps!

Replies: 3 comments 14 replies

Comment options

You must be logged in to vote
10 replies
@mithleshjs
Comment options

@gabrielmlinassi
Comment options

@benoitgrelard
Comment options

@hamidbjss
Comment options

@jtabone16
Comment options

Answer selected by rtkaaho
Comment options

You must be logged in to vote
1 reply
Comment options

You must be logged in to vote
3 replies
@Nikkoro
Comment options

@ashik-75
Comment options

@NoCtrlZ1110
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet