Search and Top Navigation
#4163 closed bug (fixed)
Opened February 16, 2009 08:44PM UTC
Closed October 26, 2010 06:18PM UTC
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.
Attachments (0)
Change History (5)
Changed February 17, 2009 12:01PM UTC by comment:1
milestone: | TBD → 1.6 |
---|---|
priority: | minor → major |
Changed March 01, 2009 08:37PM UTC by comment:2
<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.
Changed March 08, 2009 02:36PM UTC by comment:3
milestone: | 1.7 → 1.8 |
---|
Changed May 26, 2009 10:26AM UTC by comment:4
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
Changed October 26, 2010 06:18PM UTC by comment:5
milestone: | 1.9 → 1.8.6 |
---|---|
resolution: | → fixed |
status: | new → closed |
Fixed in 1.8.6.