New issue
Advanced search Search tips

Issue 599460 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

dragDataTransfer.setDragImage() offsets incorrectly interpreted

Reported by tristan....@gmail.com, Mar 31 2016

Issue description

Chrome Version       : 49.0.2623.87 (Developer Build) built on Debian stretch/sid, running on Debian stretch/sid (64-bit)

URLs (if applicable) : http://www.kryogenix.org/code/browser/custom-drag-image.html
Other browsers tested:

have tested this issue:
     Safari: OK
    Firefox: (iceweasel) OK
   Epiphany: (WebKit based) OK
         IE: Have tested before, OK on versions supporting setDragImage()

Sorry, don't have specific versions for all of these, I used to test this heavily around a year ago when I originally started using the HTML5 DnD stuff.

I *believe* it used to work with chromium/google chrome before too and that it's some regression.

What steps will reproduce the problem?
(1) Use setDragImage() in a dragstart event
(2) Visit cited link to reproduce
(3)

What is the expected result?

The image should stay below the mouse cursor nicely.

What happens instead?

The drag image instead, consistently appears somewhere to the right/below of where it is supposed to appear.

Please provide any additional information below. Attach a screenshot if
possible.

An observation I made, is that this is a multiplication/transformation error, notice that while dragging the image... it gets closer to where it should be the closer you get to the top/left of the screen... it gets farther away from the target the closer you move the mouse to the bottom/right area of the screen/browser.


 
Components: Blink>DataTransfer
Cc: dcheng@chromium.org
Status: WontFix (was: Unconfirmed)
https://html.spec.whatwg.org/multipage/interaction.html#drag-data-store-hot-spot-coordinate

From what I can tell, our current behavior is correct: we're anchoring to the (0, 0) coordinate in the image, since those are the coordinates pass to setDragImage().
Hi,

Certainly, you must not be experiencing the same behavior I see with current chromium on debian stretch for the mentioned URL.

Here is a short screen cast which shows the erratic behavior, which is absolutely incorrect under any interpretation of the spec: 

    https://people.gnome.org/~tvb/broken-set-drag-image.ogv

The position of the drag image is not even consistent with the mouse position while dragging, notice that the drag image moves further away from the mouse while dragging towards the lower right hand area of the screen, and gets closer to the mouse position when dragging towards the top left.


Sign in to add a comment