Skip to content
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

prompt an error when drop an element from one list to another [knockout-kendoSortable] #226

Closed
aufula opened this issue Jan 6, 2016 · 3 comments

Comments

@aufula
Copy link

aufula commented Jan 6, 2016

reproduce this issue on page http://kendo-labs.github.io/knockout-kendo/web/Sortable.html
check tab "Sorting between lists"

@aufula
Copy link
Author

aufula commented Jan 6, 2016

before:

//we are moving the item ourselves via the observableArray, cancel the draggable and hide the animation
e.sender._cancel();

after:

 //we are moving the item ourselves via the observableArray, cancel the draggable and hide the animation
e.sender.placeholder.remove();

@bmsmg
Copy link

bmsmg commented Jan 17, 2016

I have also run into this issue. As you stated, it is reproducible from the knockout-kendo demo pages. Your fix does the trick.

The issue comes from triggering the "end" event on the connectedList. In kendo's dragEnd event handler, when the placeholderIndex < 0, an "end" is triggered on both lists, but only the original list possesses the draggedElement property. Calling _cancel from the ko-kendo end event handler when action = "receive" will not work.

Thanks for the workaround, @aufula.

@rniemeyer
Copy link
Member

Thanks! Fixed in v0.9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants