В JQuery это все еще открытый вопрос: https://github.com/jquery/jquery/issues/2871
Вы можете сделать это с помощью vanilla js на событии:
el.addEventListener('someEvent', someFn, { passive: false });
, как упомянул кто-то в потоке githubвыше создали обходной путь, который они реализовали:
jQuery.event.special.touchstart = {
setup: function( _, ns, handle ){
if ( ns.includes("noPreventDefault") ) {
this.addEventListener("touchstart", handle, { passive: false });
} else {
this.addEventListener("touchstart", handle, { passive: true });
}
}
};