taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.19k stars 782 forks source link

fix: click event below iOS 13 do not take effect #1022

Open DAHUIAAAAA opened 7 months ago

DAHUIAAAAA commented 7 months ago

fix: #859, #812

IOS devices below version 13 don't support pointer events. When a user clicks on a div, it will trigger a touchend event. However, the touchend event in the code is not properly filtered, and it will become ineffective due to the call to e.preventDefault.

normal: image

iOS 11、12: image

Pointer Compatibility: image

DAHUIAAAAA commented 7 months ago

@taye hi~ could you have a look? 👀