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 17 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
@benoitgrelard
Comment options

Comment options

You must be logged in to vote
6 replies
@ashik-75
Comment options

@NoCtrlZ1110
Comment options

@Kochiyama
Comment options

@btnalexandre
Comment options

@dpgraham4401
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