Opened 14 years ago

Closed 13 years ago

#4163 closed bug (fixed)

Dragging by image in Chrome

Reported by: ivailo91 Owned by:
Priority: major Milestone: 1.8.6
Component: ui.draggable Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:


When you click an <img> in order to start a drag in Google Chrome, the browser starts to select text rather than drag the item. In Firefox it seems ok.

Change History (5)

comment:1 Changed 14 years ago by Jörn Zaefferer

Milestone: TBD1.6
Priority: minormajor

comment:2 Changed 14 years ago by ivailo91

<div id="draggable"><img src="icon-search-big.png" /></div> <script type="text/javascript"> $('#draggable').draggable({distance: 10}); </script>

That should show the bug. After my attempts to replicate it, it only seemed to show when the draggable had the "distance" property set.

comment:3 Changed 14 years ago by rdworth

Milestone: 1.71.8

comment:4 Changed 14 years ago by benkevich

Index: ui.draggable.js =================================================================== --- ui.draggable.js (revision 2599) +++ ui.draggable.js (working copy) @@ -50,6 +50,13 @@

this.handle = this._getHandle(event); if (!this.handle)

return false;

+ + deselecting selected text + document.body.focus(); + avoiding strange cursor behavior + document.onselectstart = function () { return false; }; + image draging tweak + = function() { return false; };

return true;


this should fix problem. Ref:

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

Resolution: fixed
Status: newclosed

Fixed in 1.8.6.

Note: See TracTickets for help on using tickets.