On new chrome version 62 released a week ago, drag/drop stopped working for me,
the below line, is whats causing it:
_on(ownerDocument, 'pointercancel', _this._onDrop);
_onDrop is triggered although drop hasn't yet occurred.
Removing this line causes the drag/drop to start working again.
I owe you a beer or small pony, dude. Thanks!
Thanks for finding this - I've been trying to figure out how everything broke on my side.
Would this be the change causing it? (edit: turns out not to be it, see below) https://chromium.googlesource.com/chromium/src/+/a11800062c65e2e1d305ab18402c48a3833dd9eb
Is this a chrome problem or a Sortable.js oversight / misinterpretation of the event?
No. This is the change causing this. Technically browsers should send pointercancel when they interrupt handling the input stream and page would not receive any more events for that pointer. We discussed this in the pointerevent working group and this github issue at length.
I'm wondering why you would need to call onDrop handler on pointercancel event. What scenario were you trying to address there?
It appears to be this:
https://chromium.googlesource.com/chromium/src/+/656f9b939150e9a40553757cea46d385bcb423d9
I'm working with the author(s) on it.
Try passive-branch
Passive mode seems to work without issue.
Is there a plan to merge the passive branch to the master? @RubaXa do you have an estimate of how many websites are broken and do not automatically use the latest version of the Sortable library? Basically the ones that don't get fixed with your fix.
And so, that now into master:
passive-branchsupportPointer: https://github.com/RubaXa/Sortable/commit/d1e6026cff304c0395ed808e251ec93e9b2ebe33// Global disabling support
Sortable.supportPointer = false;
// Or
Sortable.create(el, {
supportPointer: false,
});
If all right, then I ready to publish a new version.
@RubaXa When are you going to release the new version ?
@RubaXa, I'm a little confused by the name of the low level option. So for the people to get the library working they need to disable pointerevent support in the library? Is that correct or am I misunderstanding this?
@NavidZ I can not reproduce this problem, but if someone there is the bug, he can use this option.
Yo! My project was using 1.5.0, upgraded to 1.6.1 and everything works as expected again.
@RubaXa , any idea when you will publish a new version (cdn + npm) with the corresponding changes?
@dandv at the weekend I try to check and publish a new version.
If someone more can do this (especially Edge and Android), it would be super!
I believe I found the actual problem/solution. The problem was fixed in this commit. So anybody who is using any version newer than that should not face any issue. So I assume anybody whoever was using the older version than that was seeing this issue. So I guess the passive pointer wouldn't be needed after all.
i update sortable to new version and add option supportPointer: false to my code
Has this been resolved?
@RubaXa , Is this version available on cdn? If so what is the link?
@David-Desmaisons
https://cdn.jsdelivr.net/npm/[email protected]/Sortable.min.js
Pointercancel events have been removed in latest
Most helpful comment
+ [email protected]