dragDataTransfer.setDragImage() offsets incorrectly interpreted
Reported by
tristan....@gmail.com,
Mar 31 2016
|
||
Issue descriptionChrome 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.
,
Apr 5 2016
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().
,
Apr 5 2016
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 |
||
Comment 1 by dtapu...@chromium.org
, Apr 1 2016