Closed
Bug 646823
Opened 14 years ago
Closed 2 years ago
Drag events are not firing on a button control with "draggable" attribute set
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P5)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
RESOLVED
DUPLICATE
of bug 568313
People
(Reporter: kbibin, Unassigned)
References
()
Details
(Keywords: testcase)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Build Identifier: Mozilla/4.0
Drag events are not firing on a button control with "draggable" attribute set . Attached listener for "dragstart" event , its not getting fired .
Pasted the test code..........
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
function onDragStart()
{
document.getElementById("inpTst").value = "ondragstart fired";
}
function onLoad()
{
var htmlObject = document.getElementById("btnTest");
addListener(htmlObject,"dragstart",onDragStart);
}
function addListener(htmlObject , eventName , handler)
{
if(htmlObject.attachEvent)
{
htmlObject.attachEvent("on"+eventName,handler);
}
else
{
htmlObject.addEventListener(eventName, handler, false);
}
}
</script>
</head>
<body onLoad="onLoad()">
<button type="button" id='btnTest' draggable="true">
<DIV id='divTest' xcontentEditable="true" style="width:100px;height:100px;border:1px solid red">
<IMG src='http://www.desicomments.com/dc1/06/123052/123052.jpg' style="width:50px;height:50px;"/>
</DIV>
</button>
<input style="display:block" id='inpTst'/>
</body>
</html>
It works fine in safari and chome . For IE , we have a method dragDrop , which will internally fires "dragstart" event . only firefox , there is no work around .
Reproducible: Always
Steps to Reproduce:
Check the test code above......
Actual Results:
dragstart event not firing ..
Expected Results:
should fire the dragstart event..
![]() |
||
Updated•14 years ago
|
![]() |
||
Updated•14 years ago
|
Additional testcase: http://jsfiddle.net/EqeK5/1/
Dragging the button works fine in Chrome but not in Firefox. Tested on Firefox Aurora (29) and Chrome (33) on Arch Linux.
![]() |
||
Comment 2•11 years ago
|
||
Maybe dupe of Bug 725156
Comment 3•11 years ago
|
||
A friend on twitter reported this issue to me. His test: http://jsfiddle.net/7M3HE/
Confirming the bug and moving to the Drag and Drop component.
This is not a dupe of bug 725156 - the dragstart event doesnt even fire, so you cant do setData().
Status: UNCONFIRMED → NEW
Component: General → Drag and Drop
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Summary: Drag events are not firing on a button cotrol with "draggable" attribute set → Drag events are not firing on a button control with "draggable" attribute set
This does appear to be a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=568313.
As an aside, all XUL elements are "draggable" by default.
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations#draggableattribute
Comment 5•5 years ago
|
||
Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.
If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.
Severity: normal → S4
Priority: -- → P5
Lets track this in bug 568313.
You need to log in
before you can comment on or make changes to this bug.
Description
•