You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey ! As Safari 13 just became officially released, I noticed that bug.
Just took a few hours in the debugger to see what's going on. It turns out that's a Safari bug.
This issue is the following : whenever you perform a drag with a draggable element, and then drop the item, then the next pointerdown event won't fire (causing the library not being able to know when the user starts the next drag).
Here is a minimum reproducible exemple of the Safari bug : https://codepen.io/Tlokuus/pen/JjPVrLy
Each time you click on the black box, you can see "pointerdown" printed out in the console. But then if you drag and drop the box, the next time you will click on it, "pointerdown" won't print. Following clicks will work again until the next drag&drop.
I'll file a bug report to Apple. In the meantime, @owen-m1 , I suggest to force Sortable.js to use fallback for Safari 13 (as its drag/drop implementation is somehow buggy).
Note: The new iPadOS features a new version of Safari which behaves more than the macOS version. It is though possible that this bug exists also on iPadOS, but I can't test it as I don't have iPad (no issue however on iOS 13 for iPhone).
anyone have a solution? it still doesn't work correctly with all these fixes.
Scrolling while moving breaks this.
Also, the workaround doesn't work on nested elements and it's very buggy.
After using forceFallback: true solves Safari 13 issue, but html 5 drag dop event not working. I have a feature that I can drag a draggable item and drop it into a div(like drop file into recycle bin) after forceFallback: true it stops working. Any suggestions on that.
I used the new version and found that without forceFallback=true drag and drop only worked once in Safari 13.1.2, I have to click outside or anywhere in boy then it start to work again. I tried https://sortablejs.github.io/Sortable/#simple-list on Safari and the same not working after one drag-drop. Please help.
@AnimesHSa This issue is resolved in the latest version of Sortable (1.13.0), so you wont need to use forceFallback with that version
Thanks for fixing this issue, however the fix has caused a new issue: On iOS Safari when supportPointer is false, you can't scroll the page on an item targeted by the filter option.
Can you make the above fix only apply to desktop Safari (or only when no touch support)?
Activity
[-]Safari 13 drag event issue[/-][+]Safari 13 drag event lost[/+][-]Safari 13 drag event lost[/-][+]Safari 13 loses drag event[/+]owen-m1 commentedon Jul 16, 2019
Currently, I cannot test on this browser
courtyenn commentedon Jul 25, 2019
I can reproduce. Here is a gif showing the problem. Not sure why it would work the first time but not the second.
http://g.recordit.co/3AruBClaZ3.gif
rienswagerman commentedon Sep 13, 2019
Issue continues to happen in Safari Version 13.0.1 (14608.2.11.1.1).
Can this ticket get a 'bug' label?
rienswagerman commentedon Sep 25, 2019
Same issue in latest Version 13.0.1 (15608.2.11.1.8).
I want to look at it. @owen-m1 Any suggestions where to start?
aurelien-roy commentedon Sep 26, 2019
Hey ! As Safari 13 just became officially released, I noticed that bug.
Just took a few hours in the debugger to see what's going on. It turns out that's a Safari bug.
This issue is the following : whenever you perform a drag with a draggable element, and then drop the item, then the next pointerdown event won't fire (causing the library not being able to know when the user starts the next drag).
Here is a minimum reproducible exemple of the Safari bug : https://codepen.io/Tlokuus/pen/JjPVrLy
Each time you click on the black box, you can see "pointerdown" printed out in the console. But then if you drag and drop the box, the next time you will click on it, "pointerdown" won't print. Following clicks will work again until the next drag&drop.
I'll file a bug report to Apple. In the meantime, @owen-m1 , I suggest to force Sortable.js to use fallback for Safari 13 (as its drag/drop implementation is somehow buggy).
Note: The new iPadOS features a new version of Safari which behaves more than the macOS version. It is though possible that this bug exists also on iPadOS, but I can't test it as I don't have iPad (no issue however on iOS 13 for iPhone).
EDIT : Corresponding bug on Webkit issue tracker : https://bugs.webkit.org/show_bug.cgi?id=202287
owen-m1 commentedon Sep 26, 2019
Thanks a lot @aurelien-roy, I will look into it for the next release
reppair commentedon Dec 17, 2019
any idea for a workaround? I've tried to trigger a click() on elements, blur and focus but next drag event does not come up..
owen-m1 commentedon Dec 17, 2019
Workaround is to set
forceFallback: truein the options14 remaining items
corysus commentedon Nov 24, 2020
If you set forceFallback: true, all work fine in Safari and Chrome but not in Firefox :(
heysamtexas commentedon Jan 2, 2021
I decided to have the browser detect if it is safari and then add the forceFallback option to true only then.
I'm trying a copy-pasta from stack overflow here: https://stackoverflow.com/a/31732310/1646663
Then I take that boolean value as the input on
"forceFallback": isSafariI do this because I have it working so well in other browsers that I don't want to rock the boat :-D
daveloping10 commentedon Jan 4, 2021
anyone have a solution? it still doesn't work correctly with all these fixes.
Scrolling while moving breaks this.
Also, the workaround doesn't work on nested elements and it's very buggy.
#1571: Dont use pointer events in Safari
owen-m1 commentedon Jan 7, 2021
Fixed in the commit above
animeshsarkar-bct commentedon Feb 9, 2021
After using forceFallback: true solves Safari 13 issue, but html 5 drag dop event not working. I have a feature that I can drag a draggable item and drop it into a div(like drop file into recycle bin) after forceFallback: true it stops working. Any suggestions on that.
owen-m1 commentedon Feb 9, 2021
@AnimesHSa This issue is resolved in the latest version of Sortable (1.13.0), so you wont need to use forceFallback with that version
animeshsarkar-bct commentedon Feb 23, 2021
I used the new version and found that without forceFallback=true drag and drop only worked once in Safari 13.1.2, I have to click outside or anywhere in boy then it start to work again. I tried https://sortablejs.github.io/Sortable/#simple-list on Safari and the same not working after one drag-drop. Please help.
andrews05 commentedon Apr 28, 2021
Thanks for fixing this issue, however the fix has caused a new issue: On iOS Safari when
supportPointeris false, you can't scroll the page on an item targeted by thefilteroption.Can you make the above fix only apply to desktop Safari (or only when no touch support)?
owen-m1 commentedon Jul 8, 2021
@andrews05 Try setting the option
preventOnFilter: falseSortableJS#1571: Dont use pointer events in Safari
fix(task): dragging and dropping on mobile
fix(task): dragging and dropping on mobile