Skip to content

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

Description

@rsmarques

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

Activity

  1. aquaductape commented on Aug 24, 2020

    @aquaductape

    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();
    }
    });
    }

  2. waynevanson commented on Aug 31, 2020

    @waynevanson
    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.

  3. waynevanson commented on Aug 31, 2020

    @waynevanson
    Contributor

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

  4. aquaductape commented on Aug 31, 2020

    @aquaductape

    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.

  5. rsmarques commented on Sep 1, 2020

    @rsmarques
    Author

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

  6. Earlopain commented on Jan 27, 2023

    @Earlopain

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions