SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.7k stars 3.7k forks source link

[bug] Pinching to zoom on Android fails occasionally #1888

Open rsmarques opened 4 years ago

rsmarques commented 4 years ago

When on an Android device, the two-finger pinch action to zoom produces an inconsistent behaviour, often not zooming on the page.

It happens both inside and outside of sortable components.

No need to provide a JSBin, as it's happening on the demo page.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://sortablejs.github.io/Sortable/ on Chrome in an Android device
  2. Perform a two-finger pinch to zoom anywhere on the page.
  3. Page doesn't get zoomed occasionally.

Expected behavior

Page should always get zoomed.

Information

Tested on a Huawei P20 Pro, Android 10, Chrome version 84

aquaductape commented 4 years ago

It has to do with this touchmove event. I'll see what I can do :S

https://github.com/SortableJS/Sortable/blob/d53f85e7d63ae88d6eb4aa4d7fa3ba110779877c/src/Sortable.js#L2021-L2028

waynevanson commented 4 years ago

I own a GalaxyA21s using Firefox 79.0.5 and it works fine on my device.

@aquaductape I'm pretty sure that Sortable.active will be null because no sortables are being dragged, so no defaults will be prevented on a zoom in.

waynevanson commented 4 years ago

@rsmarques Is this on all websites using Sortable, or just the Sortable site?

aquaductape commented 4 years ago

It occurs on all websites when using Android Chrome. When i remove sortablejs on my project, I'm able to zoom consistently again on Android Chrome.

rsmarques commented 4 years ago

@waynevanson as @aquaductape stated, it happens in every website on Android Chrome which uses SortableJS

Earlopain commented 1 year ago

This is still a problem. I recently got rid of JQuery Sortable, and now users are complaing that their gesture doesn't work anymore.