I would like to disable browser’s scrolling when an event happens, but not remove the scrollbar ?
I would like something very similar to setting CSS’s overflow:hidden to the whole document. My reason is that doing so changes the browser’s width, hence I will have to re-align the body.
The best practise fix to the problem I think you’re describing is this simple CSS:
That forces the vertical scrollbar to always be visible, so that the browser’s width will not change “when an event happens”, and you won’t “have to re-align the body”.