I have a variable that gets the height of the scrollbar when overflow-x-auto and I am using a svelte javascript framework. for solving this issue I used this code: and is working fine and outputs: 17 the problem is that bind: will always fire at every rerender. As you know a scrollbar will not magically change the size, so it
Tag: scrollbar
How to block the page scrolling without affecting the style?
I’d like to block the page scrolling but without change my page style (e.g. using overflow: hidden;). I tried to use this: but but the scrolling didn’t blocked and I received this console error: Any solutions? Answer I found out the right way to disable the scrolling: In order to allow it again: