This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
swipeleft and swiperight events fire when pinch-zooming #8658
Open
Description
Example code:
$(document).on("swipeleft", function(e) {
console.log("Swipe left detected");
});
$(document).on("swiperight", function(e) {
console.log("Swipe right detected");
});
And the viewport metatag in the html:
<meta name="viewport" content="width=device-width, initial-scale=1">
Steps to reproduce:
- On a real mobile device, pinch-zoom
Expected:
shouldn't ever trigger a swipe left or right event, because you are using TWO fingers. That makes it obvious that it is not a swipe gesture
Observed:
sometimes randomly triggers a swipe event while you are pinch-zooming.
I'm under the impression that you're just testing for a touch event doing a drag motion of a length and/or speed above a certain threshold, regardless of whether there are other touch points at the same time.
Instead, you should add the condition that the finger touching and dragging is the only finger present.
Metadata
Metadata
Assignees
Labels
No labels