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?