The 'drag' event's clientX/clientY/screenX/screenY is always 0

RESOLVED DUPLICATE of bug 505521

Status

()

defect
RESOLVED DUPLICATE of bug 505521
a year ago
28 days ago

People

(Reporter: andrewhao, Unassigned)

Tracking

58 Branch
Unspecified
All
Points:
---

Firefox Tracking Flags

(firefox-esr52 affected, firefox57 wontfix, firefox58 fix-optional, firefox59 affected)

Details

(Whiteboard: [parity-Chrome][parity-Edge])

Reporter

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce:

Firefox Developer Edition 58.0b14

1. Open https://jsfiddle.net/cwb0gr0e/2/, which is forked code from the MDN "drag" documentation.
2. Observe that the "drag" event listener updates the div text with the event "clientY" and "screenY" properties
3. Drag the white "This div is draggable" box into one of the three drop zone


Actual results:

The text in the div reads "This div is draggable 0, 0"


Expected results:

The text in the div should read "This div is draggable <CLIENT_Y_POS>, <SCREEN_Y_POS>"

Updated

a year ago
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core

Updated

a year ago
Whiteboard: [parity-Chrome][parity-Edge]
Looking at the dnd processing model it looks like you should continuously fire 'drag' events "every 350ms (±200ms) thereafter for as long as the drag operation is ongoing", but as far as I can tell we've never done this. Olli or Masayuki, can you comment on this?
Flags: needinfo?(masayuki)
Flags: needinfo?(bugs)
I'm not familiar with D&D events, though.

When remote process receives an eDragOver event, TabChild tries to fire eDrag event:
https://searchfox.org/mozilla-central/rev/41925c0b6c6d58578690121de439d2a8d3d690f3/dom/ipc/TabChild.cpp#1950,1973,1979

However, nsBaseDragService::FireDragEventAtSource() sets WidgetDragEvent::mRefPoint only when the message is eDragEnd:
https://searchfox.org/mozilla-central/rev/41925c0b6c6d58578690121de439d2a8d3d690f3/widget/nsBaseDragService.cpp#465,474,490

Smaug: Do you know who worked on D&D support of e10s?
Flags: needinfo?(masayuki)
This is not recent regression, really old bug.
Status: NEW → RESOLVED
Last Resolved: a year ago
Flags: needinfo?(bugs)
Resolution: --- → DUPLICATE
Duplicate of bug: 505521

Comment 4

10 months ago
Page https://developer.mozilla.org/en-US/docs/Web/Events/dragend

States that screenX & screenY should be available in the ondragend event, but they are also set to 0.
You need to log in before you can comment on or make changes to this bug.