Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rsmarques opened this issue Aug 19, 2020 · 6 comments
Open

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

rsmarques opened this issue Aug 19, 2020 · 6 comments

Comments

@rsmarques
Copy link

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
Copy link

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

Sortable/src/Sortable.js

Lines 2021 to 2028 in d53f85e

// Fixed #973:
if (documentExists) {
on(document, "touchmove", function (evt) {
if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
evt.preventDefault();
}
});
}

@waynevanson
Copy link
Contributor

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
Copy link
Contributor

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

@aquaductape
Copy link

aquaductape commented Aug 31, 2020

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
Copy link
Author

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

@Earlopain
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants