If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Status

()

Core
Drag and Drop
RESOLVED DUPLICATE of bug 780526
5 years ago
5 years ago

People

(Reporter: rsr715, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

Steps to reproduce:

<div id="dr" style="width:50px;height:50px;background: red;position: absolute;" draggable="true"></div>

var $$ = function(el) {
   console.log(document.querySelectorAll(el));
   return document.querySelectorAll(el);
};

document.addEventListener('DOMContentLoaded', function() {
	var el = $$('#dr')[0];
	console.log(el);
   	el.addEventListener('dragstart', function(e){
   		el.style.top = e.clientY+'px';
   		el.style.left = e.clientX+'px';
		console.log(e.clientX);
	});
	el.addEventListener('drag', function(e){
   		el.style.top = e.clientY+'px';
   		el.style.left = e.clientX+'px';
		console.log(e.clientX);
	});
	el.addEventListener('dragend', function(e){
   		el.style.top = e.clientY+'px';
   		el.style.left = e.clientX+'px';
		console.log(e.clientX);
	});
});


Actual results:

"drag" event is not fired.


Expected results:

Element should chnage coords while drag. It works in Chrome.

Updated

5 years ago
Component: Untriaged → Drag and Drop
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86 → All
Version: 14 Branch → Trunk

Comment 1

5 years ago
it is fired if add dataTransfer.setData to dragstart handler

  el.addEventListener('dragstart', function(e){
+      // xxxx something to set dataTransfer
+      e.dataTransfer.setData('Text', e.target.textContent);

Updated

5 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 780526
You need to log in before you can comment on or make changes to this bug.