Opened 9 years ago

Closed 9 years ago

#7068 closed enhancement (wontfix)

draggables start and stop events should still fire when no dragging has occurred

Reported by: kellyselden Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.draggable Version: 1.8.10
Keywords: Cc:
Blocked by: Blocking:

Description

i want to perform an action based on if the draggable was clicked but not dragged (ie. deselect).

start: function() { dragged = false },
drag: function() { dragged = true },
stop: function() {
    if (!dragged) {
        //deselect
    }
}

the obvious workaround is to monitor your own mouse events, but it seems to me that it should work like this. i realize this will probably break a lot of people's code so i won't be surprised if this is wont-fixed ha.

Change History (1)

comment:1 Changed 9 years ago by Scott González

Resolution: wontfix
Status: newclosed

Draggable is intentionally meant to ignore clicks. Click events should only occur if the element was not dragged. Note that you must not bind your click handler until after you make the element draggable (of set your click handler at least one level higher in the DOM).

Note: See TracTickets for help on using tickets.