Added inline style issue #146
-
hey, I have an issue whenever I open the lightbox an inline style (padding specifically) is added to some elements like body and others, and I checked and that does not occur unless I add the library. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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 If you want to exclude some of the fixed-positioned elements, you can mark them with If you want to completely disable this behavior for some reason, you can remove the plugins={[({ remove }) => remove("no-scroll")]} April 2024 update Starting with v3.14.0, the noScroll={{ disabled: true }} |
Beta Was this translation helpful? Give feedback.
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:April 2024 update
Starting with v3.14.0, the
NoScroll
module functionality can be disabled through thenoScroll.disabled
prop: