Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#14461 closed bug (fixed)

draggable cancels operation when shiftKey is pressed

Reported by: mar10w Owned by: mar10w
Priority: minor Milestone: 1.12.0
Component: ui.draggable Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:


I would like to implement a dragging modifiers (e.g. drag/drop creates a copy when Shift or Control key is pressed). Pressing shift or control should be allowed while dragging is active, i.e. while mousbutton is down.

This is possible with jQueryUI 1.10:

But in the current release, pressing a modifier key while dragging cancels the drag operation:

Change History (5)

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

Owner: set to mar10w
Status: newpending

I'm not seeing this behavior, can you please provide the OS and browser in which you're experiencing the problem? Does this work in any browsers for you?

comment:2 in reply to:  1 Changed 8 years ago by mar10w

Status: pendingnew

I can reproduce it on OS X 10.10 on a MacBook Pro with Safari 8.0.8 when dragging the box in this jQuery UI 1.11. examples:

As soon as I press [fn], [shift, [ctrl], or [cmd], the drag operation stops (so maybe related to a keydown event?).

This does not happen when I press alphanum keys.

This does not happen in the 1.10 examples.

This does not happen with other browsers on Windows 10 (tried IE, Firefox, Chrome and Edge).

Last edited 8 years ago by mar10w (previous) (diff)

comment:3 Changed 7 years ago by hmethvin

Status: newopen

comment:4 Changed 7 years ago by Scott González

Resolution: fixed
Status: openclosed

Mouse: Ignore mousemove events triggered by key presses in Safari

If the user presses control, meta, shift, or alt during a drag operation, Safari will trigger an event where event.which is 0. We use that scenario to detect that a mouseup occurred in a different document, so we need to ignore these events when one of the keys are pressed.

Fixes #14461 Closes gh-1620

Changeset: 17b5386e8cb48c522ddb581a001fef5434e57f9a

comment:5 Changed 7 years ago by Scott González

Milestone: none1.12.0
Note: See TracTickets for help on using tickets.