2

i am getting following error:

Unable to preventDefault inside passive event listener due to target being treated as passive

from this code:

$(window).on("DOMMouseScroll mousewheel wheel", _methods._handler_window_mousewheel);

from what i was able to find, it seems that solution should be adding { passive: false } as options, but i am stuck on that, since i dont know how to do that :/ Basically like this:

document.addEventListener('touchstart', handler, {passive: false});

but when i do this:

 $(window).on("DOMMouseScroll mousewheel wheel", _methods._handler_window_mousewheel, { passive: false});

I get this error:

TypeError: ((w.event.special[a.origType] || {}).handle || a.handler).apply is not a function

My Jquery knowledge is pretty limited, so thats where i hit wall. Thanks for any help.

CosmicSeizure
  • 1,375
  • 5
  • 17
  • 35
  • could be related to this https://stackoverflow.com/questions/32231036/uncaught-typeerror-x-event-speciali-origtype-intermediate-value-handl. can you check if `_methods._handler_window_mousewheel` is not `undefined` – albert Oct 30 '19 at 00:26
  • the functions exists and is called properly. I believe the issue is with the passive options, which i am not able to set. – CosmicSeizure Oct 30 '19 at 00:32
  • Does this answer your question? [Unable to preventDefault inside passive event listener](https://stackoverflow.com/questions/42101723/unable-to-preventdefault-inside-passive-event-listener) – Julix Mar 27 '20 at 19:51

0 Answers0