Skip to content

Added inline style issue #146

Answered by igordanchenko
Bakry2002 asked this question in Q&A
Discussion options

You must be logged in to vote

Can you describe why this is an issue?

This library hides browser scrollbars when the lightbox opens. To prevent page layout shift, the library adds padding-right to the document body and fixed-positioned elements.

If you want to exclude some of the fixed-positioned elements, you can mark them with yarl__no_scroll_padding css class.

If you want to completely disable this behavior for some reason, you can remove the NoScroll module:

plugins={[({ remove }) => remove("no-scroll")]}

April 2024 update

Starting with v3.14.0, the NoScroll module functionality can be disabled through the noScroll.disabled prop:

noScroll={{ disabled: true }}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Moriarty47
Comment options

@igordanchenko
Comment options

Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants