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: |
Description
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
Milestone: | TBD → 1.6 |
---|---|
Priority: | minor → major |
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Milestone: | 1.7 → 1.8 |
---|
comment:4 Changed 14 years ago by
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 + event.target.ondragstart = function() { return false; };
return true;
EOF
this should fix problem. Ref: http://luke.breuer.com/tutorial/javascript-drag-and-drop-tutorial.aspx
comment:5 Changed 13 years ago by
Milestone: | 1.9 → 1.8.6 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in 1.8.6.
<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.