-
Notifications
You must be signed in to change notification settings - Fork 26
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
Dropped event is fired on cancellation #34
Comments
It was intended originally but I'm now thinking it'd be useful to add support for a new "cancelled" event and fire that rather than dropped. What do you think about that? |
That would be great, right now I'm using a "Save Changes" button since I don't have a reliable way to know if the user canceled the action or actually dropped the item. However, I am a bit confused because it looks like there is a I tested hooking into that event as well as the dropped and confirmed that both |
Ah right. I completely forgot about the |
…in Dragon Drop
I ran into this issue, also. Unfortunately, the "cancel" seems to trigger after the "dropped" event and with a new order as if it had been reordered. If it triggered before then an easier workaround would be to ignore the "dropped" event immediately following a "cancel" event. We are also updating ordering to the server by AJAX/json, so I put a very hacky workaround in that saves the original order before reordering of the "dropped" event and then if a cancel event happens it makes a slightly delayed request that re-updates back to the original order to overwrite bad order from the extra "dropped" event. Our UI design doesn't have submit buttons. The cancel problem only happens when using the keyboard to reorder, afaik. While the display reverts correctly on a pressing the escape key to cancel the data present at the drop event looks like something got moved. It would be nice if the "dropped" trigger never fired at all since the user never completed the action or intended a drop if they hit escape. |
I have a list of items that I need to update on the server when a reorder is performed. To do this I hook into the
dropped
event and perform an ajax call . However, it appears that thedropped
event fires even when a user cancels the re-order withesc
. Is this intended functionality?The text was updated successfully, but these errors were encountered: