Closed RyanGosden closed 2 years ago
Wondering the same here, that makes for weird jumps in the layout
Same issue here...
@RyanGosden @tobkum @j3ll3yfi5h
The code is meant to keep your scrollbar offset in tact so that your layout doesn't jump. My layout doesn't jump on my end. I've just testing Windows and Mac across a range of browsers.
The reason for the body scroll lock is for mobile support, the page should remain fixed when you're interacting with the compare viewer with your finger. It will outright break vertical option if it doesn't lock.
What browsers / devices are you using that your layout is popping?
Does the demo pop for you?
@kylewetton
If you add...
html {
overflow-y: scroll;
}
...you will see the jumping as well.
I'm currently trying to find out, if scrollbars on html
-elements are wrong and why or not...
This issue is based on the used library https://github.com/willmcpo/body-scroll-lock
Related (unresolved) issues are: https://github.com/willmcpo/body-scroll-lock/issues/108 https://github.com/willmcpo/body-scroll-lock/issues/244
Minor issue which causes the page to 'jump' to the hiding and showing of scrollbar.
Edit: Looking at your src, it seems like this is deliberate. Is there a specific reason to why the scrollbar is disabled?