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.77k stars 3.71k forks source link

[bug] tap(click) event is still not working on Android (v 12-13) Chrome browser on Samsung/Pixel phones #2312

Open AnastasiiaMP opened 1 year ago

AnastasiiaMP commented 1 year ago

I saw several issues like that, the last one with suppose fix was the following https://github.com/SortableJS/Sortable/issues/2136. But issue is still there on some phones like Samsung and Pixels, on One plus is working perfectly. From what is noticeable I can make a concussion that draggable event is being called, but tap/click event is never being called (we have tag with x button and click event on it), because as soon as draggable event is called the long text got text-overflow: ellipsis style, and this what exactly happening.

Screenshot 2023-08-30 at 10 20 47 Screenshot 2023-08-30 at 10 20 12

This problem is not reproducible in only one Mozilla Firefox browser, which uses its own rendering engine - GeckoView, all other browsers on Android (as Google Chrome, Microsoft Edge, Opera and Brave) use the Google Chrome rendering engine - Blink. It seems that the issue is reproducible only on the Google Chrome rendering engine - Blink

Thank you!

PersonalityFox commented 9 months ago

Hi

I spent a lot of time trying to figure out a similar situation. Somewhere in the issue they wrote how this can be fixed with 2 parameters, but it didn’t work for me:

filter: "input",
preventOnFilter: false,

In your case it look like this:

new Sortable(sortableList, {
    animation: 150,
    filter: "button",
    preventOnFilter: false,
});

Important! The click should be processed without bubbling. That is, it is your close button

Clydinite commented 6 months ago

@AnastasiiaMP adding a delay works for me.

Sortable.create(sortable, {
    animation: 150,
    delay: 100,
    delayOnTouchOnly: true,
    }
});