I see following error in my website:
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
I searched a lot about this error and I already seen several topics about it but it couldn't help me. So I have to ask this question directly.
I know following part of code needs to edit
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
or probably a part of this code:
jQuery.Event.prototype = {
preventDefault: function() {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
// otherwise set the returnValue property of the original event to false (IE)
} else {
e.returnValue = false;
}
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if stopPropagation exists run it on the original event
if ( e.stopPropagation ) {
e.stopPropagation();
}
// otherwise set the cancelBubble property of the original event to true (IE)
e.cancelBubble = true;
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = returnTrue;
this.stopPropagation();
},
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse
};
After a lot of searches I did find that I should add {passive: false}
somewhere in above code but I don't know exactly where? (as I'm not programmer). Can you show it please
Also please do not close this question as a duplicate because it's not. thanks