-
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
delay option doesn't work #659
Comments
Hi, I second that, same experience. Feature is required to allow scrolling on touch devices. With no delay list items gets dragged immediately preventing page scroll. OK, just found out that if I turn 'forceFallback' on delay works (tested on IE 11 and IPad Safari) |
+1. It does work on webkit browsers however, but not on FF. dragStartFn does get called in the setTimeout, and some stuff is handled, like the classes added to the dragging element. But the actual dragging never happens. Very weird. |
doesn't work on Safari on an iPad either |
I found the same issue with IE 11 and Firefox. Setting |
@RubaXa I dug around in the dev code (Sortable.js) and found an issue: When there is a delay for FF/IE11, the |
+1. |
+1, It looks this emileber@20a8058 fixes the bug. Is it possible to be merged? |
@sbayd I just tried @Xom9lk fix with my own fork and it doesn't really work (weird glitch with different browsers) and It'd need some more work to be totally fixed. While I'm thankful RubaXa made this project, the way he's handling it now is borderline hostile (closing merge requests and issues without explanations, never replying to some issues, overall tone of the communication, etc.) and it seems like a waste of time to try and get non-trivial pull requests merged. This was opened a year ago and never was acknowledged by him. He clearly doesn't have time for this project unfortunately and we'd better use our own fork. |
True, I do not have time, but and from you I have not seen any PR.: https://github.com/RubaXa/Sortable/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aemileber%20 |
@emileber I tried to use your fix, but it does not work (FF): http://recordit.co/PTeUNSLP7g |
Now the problem can be solved only by means of |
If it mobile environment remove all lines of code where 'pointermove' appears |
In addition to the mobile scrolling use case, the |
I have three problems with delay/forceFallback:
|
@webarthur, I am not the owner of Sortable, not even did I raise this issue #659, so just quick comments:
|
The mobile issue occurs on PWA (chrome). |
All works fine now! =) I just have replaced the line
The click bug, the evt.preventDefault() is not working. I put a flag in callback to check it on custom click function, example:
@geonanorch thanks for helping. =D |
Hello, I don't know if my solution is correct but for my reasons work perfectly. I found that on Android, line
|
Try master branch please |
@owen-m1 I just did (using Firefox 61.0.2), no luck but I think that I have a lead. Imho the
Something like: Sortable.create(el, {
draggable: '.zone_out',
delay: 200,
touchStartThreshold: 5,
onChoose: () => console.log('sortable onChoose'),
onUnchoose: () => console.log('sortable onUnchoose'),
onStart: () => console.log('sortable onStart'),
onEnd: () => console.log('sortable onEnd'),
}); will not work, but commenting out
Debugging my particular case further, going up the call stack:
I then looked at // Make the element draggable
dragEl.draggable = _this.nativeDraggable; should be moved outside of $ diff -e Sortable.js Sortable.js.org
819,820d
808a
// Make the element draggable
dragEl.draggable = _this.nativeDraggable;
. |
@geonanorch I used your fix in the above commit. Please try |
@owen-m1 just gave it a go, works for me, thanks. I guess that some browsers initiate dragging on the |
@geonanorch IE and Edge seemed to have that paticular restraint as well. However, IE and Edge will also not cancel a dragstart if the draggable property is removed after the mousedown, making a delay feature impossible on these browsers. |
While I was still receiving notifications for this issue, it's been more than 2 years since I haven't touched this lib, which was in a Backbone project 2 job hops ago. Though I'm glad that the development of Sortable was taken over by someone! Good job 🎉 |
Hi,
I am checking the demo: http://jsbin.com/videlojafi/edit?html,js,output
It doesn't work for me on either firefox, or IE (10).
Once removing the delay line, or changing it to 0, everything starts to work
The text was updated successfully, but these errors were encountered: