Attempting to scroll over sidebar causes entire page scroll #2405
-
Hi I have added a sidebar to my page with Expected behavior:
This behavior can be seen, for example, with modal windows Actual behavior: Codepen with the page from video I suppose I did something wrong. Can someone help me with fixing markup/js? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The scrollLock feature needs to be refactored, as it uses the DOMMouseScroll Event, which is only supported in Firefox as of https://caniuse.com/?search=dommouse (and even running your code in Firefox does not prevent scrolling anyway), so this is nowadays a bug/not working feature. I'll create an issue. |
Beta Was this translation helpful? Give feedback.
-
In the meantime, as a workaround, you can simply disable overflowing the body when the sidebar is shown so scrolling has no effect anymore (untested, this could have side effects, when your sidebar itself needs to be scrolled) |
Beta Was this translation helpful? Give feedback.
-
Scrolllock feature is now fixed by #2436 |
Beta Was this translation helpful? Give feedback.
In the meantime, as a workaround, you can simply disable overflowing the body when the sidebar is shown so scrolling has no effect anymore (untested, this could have side effects, when your sidebar itself needs to be scrolled)
https://jsfiddle.net/lubber/dpu8gy65/5/