#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: |
Description
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:
http://api.jqueryui.com/1.10/draggable/#entry-examples
But in the current release, pressing a modifier key while dragging cancels the drag operation:
Change History (5)
comment:1 follow-up: 2 Changed 8 years ago by
Owner: | set to mar10w |
---|---|
Status: | new → pending |
comment:2 Changed 8 years ago by
Status: | pending → new |
---|
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).
comment:3 Changed 7 years ago by
Status: | new → open |
---|
comment:4 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
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
Milestone: | none → 1.12.0 |
---|
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?