ng-sortable
ng-sortable copied to clipboard
Prevent drop if element is not currently on dropzone
Hi, I like this library, but i like to modify a default behaviour to fit my needs. I have 3 div with draggable elements. Name it A, B and C. I start drag from A and want to drop to C. I stop dragging element over C, but C is disabled, so element can't drop in C. Ok, to reach C, I am passed over B, so B "get the drop focus". So, when i stop drag element over C (disabled), the element will drop in B. I don't like this behaviour. I like that when i stop drag element over C (disabled), the element will return in A (the starting point).
How could i configure library to get this behaviour? Thank you and thanks for your work! :)
I am facing the same issue described by @loverdrive but with a slightly different scenario.
I have two lists, one of "Available items" and one of "Selected items" as you can see in this plunker. The user can drag items from the available to the selected items.
My scenario is as follows:
- User starts dragging Available item
- Drags the item over the Selectable items zone BUT without dropping it
- User thinks about it and decides she does not want to select the item, and continues dragging the item to the first list and drops it back there.
- The user unexpectedly sees that the item appears on the selected items list.
I would like to avoid this as well. @a5hik is there a way to accomplish this?
I have the same issue. Anyone started working on a fix for this?
+1. Facing similar issue. Unable to remove the placehoder once it gets generated without droping item into dropzone :(
fixed : https://github.com/a5hik/ng-sortable/pull/379
HI there. Same issue and it reproducable even in official demos. Look http://a5hik.github.io/ng-sortable/#/clone if you drag item over List B it is only possible to cancel by clicking esc button.
If it fixed by pull request by @romuloricoy can it be merged so we can use?