I\'m using Framework7 sortable list and it works well, just that it doesn\'t trigger an event when the list is changed.
So I\'m trying a few built-in events:
<See this blog post. If you call preventDefault
on every touchstart
then you should also have a CSS rule to disable touch scrolling like
.sortable-handler {
touch-action: none;
}
I am getting this issue when using owl carousal and scrolling the images.
So get solved just adding below CSS in your page.
.owl-carousel {
-ms-touch-action: pan-y;
touch-action: pan-y;
}
or
.owl-carousel {
-ms-touch-action: none;
touch-action: none;
}
To handle sortable list in Framework7 when user release currently sorting element in new position, you can use this code:
$$('li').on('sortable:sort',function(event){
alert("From " + event.detail.startIndex + " to " + event.detail.newIndex);
});
Fiddle : https://jsfiddle.net/0zf5w4y7/
For me
document.addEventListener("mousewheel", this.mousewheel.bind(this), { passive: false });
did the trick (the { passive: false }
part).
In plain JS add { passive: false }
as third argument
document.addEventListener('wheel', function(e) {
e.preventDefault();
doStuff(e);
}, { passive: false });
To still be able to scroll this worked for me
if (e.changedTouches.length > 1) e.preventDefault();