Unable to preventDefault inside passive event listener

0 votes

I am trying on some built-in events:

 $('.sortable-handler').on('touchstart', function (e) {

    e.preventDefault();

    alert('touchstart');

});


$('.sortable-handler').on('touchmove', function (e) {

    e.preventDefault();

    console.log('touchmove');

});


$('.sortable-handler').on('touchcancel', function (e) {

    e.preventDefault();

    console.log('touchcancel');

});


$('.sortable-handler').mouseleave(function (e) {

    e.preventDefault();

    console.log('mouseleave');

});

But I am getting this error:

Unable to preventDefault inside passive event listener due to the target being treated as passive. See https://www.chromestatus.com/features/5093566007214080

I am using  Framework7 sortable list but it doesn't create an event when it's triggered that's why I tried creating this built-in event. So can someone help me with this?

May 12, 2022 in Node-js by Kichu
• 19,040 points
3,550 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Node-js

0 votes
1 answer

How to include scripts located inside the node_modules folder?

Hello @kartik, I would use the path npm ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,840 points
8,943 views
0 votes
0 answers
0 votes
1 answer

How to read environment variables in Node.js?

Hello @kartik, Yes,you can read environment variables in Node.js ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
1,634 views
0 votes
1 answer

How to write files in Node.js?

Hello @kartik, Currently there are three ways to ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
934 views
0 votes
1 answer

How to get GET (query string) variables in Express.js on Node.js?

Hello @kartik, Since you've mentioned Express.js in your ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
3,277 views
–1 vote
1 answer

How to uninstall npm modules in node js?

Hello @kartik, The command is simply: npm uninstall ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
3,215 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,352 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
15,885 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
23,396 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

answered May 12, 2020 in JQuery by Niroj
• 82,840 points
3,343 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP