I’ve came across to the next article, there I found example with blocking scroll event:
document.body.addEventListener('pointermove', event => {
if (event.cancelable) {
event.preventDefault(); // block the native scroll
/*
* do what you want the application to do here
*/
}
}, {passive: true});
but, it doesn’t work, by the way I see illogicality using preventDefault
in passive: true
event. What is going on, anyone would explain to me?