Interact.js: Dragging doesn't working without "touch-action" css rule on mobile Chrome, Opera, etc.. Except mobile Firefox

Created on 5 Dec 2017  路  3Comments  路  Source: taye/interact.js

Hello! Please help me, describe what i doing wrong.

I created simplest example to test this library, but it doesn't work on mobile browsers except Firefox :(

Expected behavior

Dragging working on all devices.

Actual behavior

Dragging working only on desktop and on mobile Firefox. On mobile (or in chrome browser with mobile emulation) dragging will start, but ends just after few moves.

System configuration

interact.js version: 1.3.1
Browser name and version: Chrome, Opera, etc?..
Operating System: Android, Arch linux, etc?..

Most helpful comment

Ow, i finded solution! See working example.

Can you add note about it on your website?

You just must add next CSS to your draggable elements:

.draggable {
    touch-action: none
}

All 3 comments

Ow, i finded solution! See working example.

Can you add note about it on your website?

You just must add next CSS to your draggable elements:

.draggable {
    touch-action: none
}

I'd like to upvote this issue. I encountered the same problem while upgrading from 1.2.9 to 1.3.3. When dragging the dragend event fires almost immediately after dragstart. I was able to reproduce this behavior in mobile emulator mode in Chrome 63 and in Chrome 63 on a Samsung Galaxy S6 . It works fine for desktop.

This change was introduced sometime between 1.3.0-alpha.3 and 1.3.0-alpha.5 (alpha.4 is not available on NPM).

JSFiddle reproducer

Thanks for the workaround @believer-ufa!

Closing this and leaving #595 open.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brunolm picture brunolm  路  8Comments

johannes-z picture johannes-z  路  4Comments

max-mykhailenko picture max-mykhailenko  路  5Comments

andrewgleave picture andrewgleave  路  6Comments

jbaartman picture jbaartman  路  4Comments