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,646 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
9,024 views
0 votes
0 answers
0 votes
0 answers

How to access custom attributes from event object in React?

With the help of code and example ...READ MORE

1 day ago in Node-js by Nidhi
• 8,920 points
10 views
0 votes
0 answers

What is the best way to trigger change or input event in react js?

With the help of code and example ...READ MORE

1 day ago in Node-js by Nidhi
• 8,920 points
17 views
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,710 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
989 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,494 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
16,359 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,704 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,483 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