Closed Bug 1396403 Opened 7 years ago Closed 7 years ago

`ondragend` event on anchor reports nonsense x and y coordinates

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 505521

People

(Reporter: roderic.day, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170902100317

Steps to reproduce:

Using this HTML file:

```
<body></body>
<script>
anchor = document.createElement("a");
anchor.textContent = "hey";
anchor.href = "#";
anchor.ondragend = function(e){console.log(e)};
document.body.appendChild(anchor);
</script>
```

Simply drag the anchor on-screen, and watch the console.


Actual results:

On Firefox, the event always returns

`dragend { target: a, buttons: 0, clientX: 0, clientY: 0, layerX: 17895698, layerY: 17895698 }`


Expected results:

On Safari and Chrome, the event returns something like

`DragEvent {isTrusted: true, dataTransfer: DataTransfer, screenX: 149, screenY: 279, clientX: 81, …}`
Component: Untriaged → Drag and Drop
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.