PreventDefault
-
I noticed that autoptimize is causing a significant number of errors to be logged in the chrome dev console. It appears that Chrome 73 adjusted the way it handles passive event listeners: https://www.chromestatus.com/features/6662647093133312. As I scroll through down my website, I see 50-100 of these messages: “[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.”
It appears that the event.PreventDefault causes this error in the following code (right above Jquery Tiny Pub/Sub)
1.2 < Math.abs(deltaX) && (deltaX *= options.stepSize / 120);
1.2 < Math.abs(deltaY) && (deltaY *= options.stepSize / 120);
scrollArray(overflowing, -deltaX, -deltaY);
event.preventDefault()
});
addEvent(“mousedown”, function(event) {
activeElement = event.target
});
addEvent(“load”, init)
The topic ‘PreventDefault’ is closed to new replies.