Skip to main content

Search and Top Navigation

#8414 closed feature (wontfix)

Opened June 28, 2012 01:25AM UTC

Closed June 28, 2012 01:38AM UTC

Last modified October 23, 2013 11:54AM UTC

Draggable should provide a "cancel" method.

Reported by: brennan.roberts Owned by: brennan.roberts
Priority: minor Milestone: 1.9.0
Component: ui.draggable Version: 1.8.21
Keywords: Cc:
Blocked by: Blocking:
Description

Woe to the Draggable: why has it not a proper "cancel" method? While his sibling Sortable may be halted on command, Draggable must sit idly by, waiting for that next "drag" event so that we may return false. Pity.

Let us rectify this grievance forthwith!

Attachments (0)
Change History (9)

Changed June 28, 2012 01:27AM UTC by scottgonzalez comment:1

owner: → brennan.roberts
status: newpending

Why? Programmatic canceling is bad UX. We plan on removing it from sortable.

Changed June 28, 2012 01:34AM UTC by brennan.roberts comment:2

status: pendingnew

The scene: generic real-time application. A mess of draggable things that may be moved or deleted by any user. User A starts dragging one item. User B deletes the same one.

This displeases user A. But such is collaboration.

Changed June 28, 2012 01:38AM UTC by scottgonzalez comment:3

resolution: → wontfix
status: newclosed

You should let the user finish their action and then inform them that the item has been deleted by someone else. Dragging is not a long running operation.

Changed June 28, 2012 01:49AM UTC by brennan.roberts comment:4

Perhaps.

Imagine the same application, except where large modal changes will and do happen frequently, entirely replacing the original collection of draggable things. What happens here to mid-drag item? Must it persist in this new, unwelcoming world until liberated by a mouseup?

Changed June 28, 2012 02:05AM UTC by scottgonzalez comment:5

It should. That's much less jarring to the user. You can display a message to the user if you need to, or manually find a way to cancel. But, this is bad UX. You should not remove an item that a user is in the middle of dragging. We will not encourage such behavior by adding a method to explicitly do so.

Changed June 28, 2012 02:20AM UTC by brennan.roberts comment:6

It's an interesting opinion, but I'd always considered jQuery UI an unopinionated toolkit that provided all the necessary means to shoot myself in the foot. I'll have to either adjust that or get my bullets elsewhere.

Thank you for your time and swiftness.

Changed November 01, 2012 05:26PM UTC by eleotlecram comment:7

Correct me if I'm wrong, but AFAIK most drag-and-drop file explorers (Windows Explorer, OSX Finder, KDE's Konqueror and Dolphin, Gnome's Nautilus) allow you, as the user, to start dragging a resource and then, mid-flight, allow you to hit the ESC button, which will then immediately abort the drag operation and revert the state to which it was prior to drag start.

Now do you guys suggest that all these file explorers have their UX wrong? I suggest one reconsiders reopening this ticket.

Changed November 01, 2012 07:49PM UTC by scottgonzalez comment:8

_comment0: @eleotlecram: Whether pressing escape should cancel a drag and whether there should be a public cancel method are two different things. Providing a public cancel method encourages users to create bad UX. The team has discussed this before, while reviewing sortable's API. Sortable's cancel method was implemented by Paul Bakaus for a user with the use case as brennan.roberts, but even Paul agrees that it should be removed.1351799376998977

@eleotlecram: Whether pressing escape should cancel a drag and whether there should be a public cancel method are two different things. Providing a public cancel method encourages users to create bad UX. The team has discussed this before, while reviewing sortable's API. Sortable's cancel method was implemented by Paul Bakaus for a user with the same use case as brennan.roberts, but even Paul agrees that it should be removed.

Changed October 23, 2013 11:54AM UTC by tjcrowder comment:9

Please reopen this ticket and fix this. I'd be happy to fix it if the fix will be accepted. It's simple, basic functionality for which there are solid, real-world use-cases. I was VERY surprised to find I had to hack together a way to allow the user to remain in control of the drag (by being able to cancel it).