Skip to content

Delay option has no effect on Android devices #1556

Closed

Description

@raimund-schluessler

Problem:

In short: The delay option has no effect on Android devices.

I want to set a delay before a drag event starts so that you can scroll the list without accidentally starting to drag an item. The delay option is the proper solution for this and it works fine on iOS12. On the Android devices I tested, the delay is ignored and the drag event starts immediately, which prevents the user from scrolling the list.

I could reproduce the issue with Sortable.js/1.9.0 as well as 1.10.0-rc3

Devices/browsers tested:

  • Samsung Galaxy A3 SM-A310F with Android 7.0 / Chrome 75.0.3770.101 and Samsung Internet 9.2.10.15
  • Samsung Galays S10e SM-G970F with Android P / Mozilla/5.0 (Linux; Android 9; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Mobile Safari/537.36

The issue was originally reported in nextcloud/tasks#457.

JSBin/JSFiddle demonstrating the problem:

See this example: https://codepen.io/raimund-schluessler/pen/EBRxdz
On iOS the drag only starts after to hold an item for 500 ms, which enables scrolling. On Android, this does not work and dragging starts immediately.

Used Sortable config

new Sortable(example1, {
  animation: 150,
  ghostClass: 'blue-background-class',
  delay: 500,
  delayOnTouchOnly: true,
  touchStartThreshold: 3
});

Activity

  1. owen-m1 commented on Jul 3, 2019

    @owen-m1
    Member

    Interesting. I can already tell it's because it is not being detected as a touch event, since disabling delayOnTouchOnly makes it work. I will investigate this.

  2. added a commit that references this issue on Jul 3, 2019
  3. owen-m1 commented on Jul 3, 2019

    @owen-m1
    Member

    Should be fixed in commit a09bddb.

  4. barryels commented on Sep 6, 2019

    @barryels

    Thanks for the fix @owen-m1 👍 Is there a timeline for when this would make it into a build (1.10.0-rc3 perhaps)?

  5. owen-m1 commented on Sep 9, 2019

    @owen-m1
    Member

    @barryels 1.10.0 will be ready soon I hope

  6. added a commit that references this issue on Nov 18, 2019
  7. added a commit that references this issue on Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions