I am using a mac trackpad.How to prevent the page going back and next to visited pages on horizontal scroll ?.
I tried to prevent the wheel events but it doesn't works most of the time.
container.addEventListener('wheel', function(ev) {
ev.preventDefault();
ev.stopPropagation();
return false;
}, {passive: false, capture: true});
even I tried blocking with mousewheel event which also leads to page navigation.
It has nothing to do with a webpage nor its events; this is specific system behavior and I don't think it can be blocked from javascript level.
If you want to disable it - go to:
Apple Logo > Preferences > Trackpad > More gesturesand uncheckSwipe between pagesOk, I googled a bit and it seems I was wrong- there is a solution to that and basically is pretty simple:
Just tested this on OSX Chrome 67