-
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
Fix https://github.com/SortableJS/Sortable/issues/1539 #1540
Conversation
Added some fixes and prioritize usage native cloneNode instead of jQuery. |
Hi, is there any chance that this PR is accepted in near future? I need to know if I can use SortableJS in my legacy project. Thanks for letting me know. |
Sorry for the delay, I will get to this soon |
Great, thanks ! |
@efattal Why the change in the cloning? |
For performance reason. Shouldn't available native methods be used instead of polyfills? Edit ; however, jQuery's method copies the events, so maybe this is not à good idea. Edit 2 : btw, those references specifically to Polymer and jQuery seem a bit weird to me. |
@efattal I think they are necessary as clearly people in the past wanted to clone the events if that code was added in the first place. Also, with prioritizing native cloning you are making the jQuery cloning clause redundant as it will never be called. This change would probably break a few use cases, so if you can please change it back then I can merge this PR. |
Hi @owen-m1 , I rollbacked my change of the cloning method. Thanks for accepting the PR. |
Hi @owen-m1, when could this fix be available? Thanks |
@efattal Should be available now in 1.10.0-rc3 |
When Array.prototype is override, Sortable breaks on drag-dropping when looping on Arrays with for...in (like _detectNearestEmptySortable on sortables).
Proposed solution: loop on Arrays with forEach instead of for...in