Skip to content Skip to sidebar Skip to footer

Understanding Html 5 Event Drag

I do not understand why the returning value for mouse coordinate clientX in event drag is always 0 or a negative value just before releasing the mouse. I have prepare an example, w

Solution 1:

In my tests on Firefox the drag element ONLY fires a 0. AND, the drag event stopped the "mousemove" event from reaching the document level to capture it that way.

jsfiddle.net/qgedt70a/

Mozilla's official docs say the clientX is local for dragged objects and screenX is global coordinates, however both return 0 from the drag event in variations of my tests at the above jsfiddle.

Could be a bug. OR, I'm curious if they have disabled it for some strange security scenario?

Post a Comment for "Understanding Html 5 Event Drag"