-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari 13 loses drag event #1571
Comments
Currently, I cannot test on this browser |
I can reproduce. Here is a gif showing the problem. Not sure why it would work the first time but not the second. |
Issue continues to happen in Safari Version 13.0.1 (14608.2.11.1.1). Can this ticket get a 'bug' label? |
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? |
Hey ! As Safari 13 just became officially released, I noticed that 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 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 |
Thanks a lot @aurelien-roy, I will look into it for the next release |
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.. |
Workaround is to set |
sure, it works, I need to fix a custom DnD I wrote, can you share what it dues exactly? I tried to dig it out but could not figure it? |
@reppair What would you like me to explain? |
In general how you work around the problem. What does this option actually do? |
@reppair It stops Sortable from using the browser's native drag and drop API (which is broken in the case of Safari 13). However, Sortable has it's own implementation code that let's it simulate drag and drop without using the browser's native API. So basically, it's the exact same except you will not be able to use some of the native drag and drop features such as |
So we just ran into this problem with Safari. Going over the lib code again there is an option (not documented) |
unfortunately still an issue in safari 13.1 either |
Where's the documentation for |
@einfallstoll it is just whether or not Sortable will use the pointer events or not |
Both
Is this the correct way to declare those properties? |
Because I want to slove the problem in Safari 13, I set the option forceFallback: true, but then I got another problem in Chrome, Safari and Firefox. The problem is: when a drag a elem then drop, it goes back to the original position, but then the page's button can't be clicked, it need to click two times. I set the supportPointer: false cannot solve. How to solve the problem? Need Help. |
Encountered the same issue in Safari Version 13.0.5 (15608.5.11), while it works as without issue in Chrome and Firefox. |
I ran into same problem on Safari 13.1 — adding Thanks to all for raising this issue and finding a solution — this was a head scratcher for me. |
Thanks! I was ready to give up just before I found this! |
If you set forceFallback: true, all work fine in Safari and Chrome but not in Firefox :( |
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 I do this because I have it working so well in other browsers that I don't want to rock the boat :-D |
anyone have a solution? it still doesn't work correctly with all these fixes. |
Fixed in the commit above |
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. |
@AnimesHSa This issue is resolved in the latest version of Sortable (1.13.0), so you wont need to use forceFallback with that version |
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.
|
Thanks for fixing this issue, however the fix has caused a new issue: On iOS Safari when |
@andrews05 Try setting the option |
This change fixes a regression introduced in 1cbb93e. In that change, the whole task area was made clickable using mouse events directly. Unfortunately, this also prevented the parent component of the task component to recieve them, essentially never getting notified about the mouse movement and thus never dragging the task. I don't know why this is only a problem on Safari, but it might be related to SortableJS/Sortable#1571 (comment) Resolves https://community.vikunja.io/t/task-re-ordering-is-not-working-in-safari/1916 Resolves https://kolaente.dev/vikunja/vikunja/issues/2092 Resolves #304
This change fixes a regression introduced in 1cbb93e. In that change, the whole task area was made clickable using mouse events directly. Unfortunately, this also prevented the parent component of the task component to recieve them, essentially never getting notified about the mouse movement and thus never dragging the task. I don't know why this is only a problem on Safari, but it might be related to SortableJS/Sortable#1571 (comment) Resolves https://community.vikunja.io/t/task-re-ordering-is-not-working-in-safari/1916 Resolves https://kolaente.dev/vikunja/vikunja/issues/2092 Resolves #304 (cherry picked from commit abf92e2)
Problem:
On Safari Version 13.0 (14608.1.32 / 15608.1.31.1.2) the drag event is broken after initial drag & drop:
page demonstrating the problem:
http://sortablejs.github.io/Sortable/
The text was updated successfully, but these errors were encountered: