+ 2
I dont think there is a direct way to prevent scrolling. But you can prevent interaction events that would do the scrolling. Here is an example to prevent scrolling by the 'wheelevent': window.addEventListener(wheelEvent, preventDefault, wheelOpt); When you want to enable scrolling again you can remove the EventListener: window.removeEventListener(wheelEvent, preventDefault, wheelOpt); I hope that helps.
24th Apr 2020, 9:48 AM
Jannis
Jannis - avatar