On "dragend", "out" gets triggered, even also if 'el' never gets dragged out of 'source'. Is this a faulty behavior or am I just don't getting the purpose of it?
Background:
I have container with elements which must be removed on spill, but the remove must be confirmed. The "remove" event is not an option, because if the confirmation failed, I would need to reload the window.
Therefore, I intended to add the class "remove" to 'el' on "out" and remove this class on "over" (this class will also turn 'el' and the mirror red for better visualisation). On "draggend", I check whether 'el' has class "remove" and if so a confirmation message will be fired. However, as "out" gets fired every time on "dragend", this doesn't work at all.
On "dragend", "out" gets triggered, even also if 'el' never gets dragged out of 'source'. Is this a faulty behavior or am I just don't getting the purpose of it?
https://jsfiddle.net/43shxLk0/
Background: I have container with elements which must be removed on spill, but the remove must be confirmed. The "remove" event is not an option, because if the confirmation failed, I would need to reload the window. Therefore, I intended to add the class "remove" to 'el' on "out" and remove this class on "over" (this class will also turn 'el' and the mirror red for better visualisation). On "draggend", I check whether 'el' has class "remove" and if so a confirmation message will be fired. However, as "out" gets fired every time on "dragend", this doesn't work at all.