DataTransfer.setDragImage on drag and drop events incorrectly treat x and y offset as screen pixels
Reported by
lpchan...@gmail.com,
Nov 18 2016
|
|||||||
Issue description
Chrome Version : Version 54.0.2840.99 m
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari:
Firefox:
IE:
What steps will reproduce the problem?
(1) Open the attached setdragimage.html in the Chrome browser.
(2) Drag the blue square. A yellow circle appears as the drag image. With browser zoom level at 100% (no zoom), the mouse cursor is at the center of the drag image.
(3) Change the browser zoom level to say 200%. Drag the blue square again, and the mouse cursor is no longer at the center of the drag image.
What is the expected result?
The mouse cursor should be at the center of the drag image regardless of the zoom level.
What happens instead?
The mouse cursor is not at the center of the drag image at zoom level other than 100%.
Please provide any additional information below. Attach a screenshot if
possible.
According to W3C spec on HTML5 drag and drop, the "drag data store hot spot coordinate" (i.e. the x and y offset parameters for setDragImage) should be in CSS pixels. It appears that Chrome is treating them as screen pixels, which causes the problem since everything else related to the image element as well as other elements on the page are in CSS pixels.
,
Nov 18 2016
,
Nov 18 2016
,
Nov 21 2016
Able to reproduce the issue on Windows-7, Mac-10.11.6 and Linux Ubuntu-14.04 using chrome stable version 54.0.2840.99 and latest canary 57.0.2926.0 with the steps mentioned above Observed that the mouse cursor was not at the center of the drag image at zoom level other than 100%. This is non-regression issue observed from M-30 # 30.0.1599.0. Hence marking it as Untriaged to get it addressed. Please find the attached screencast for reference. Note:Same behavior observed in other browser also(Firefox). Thanks.
,
Nov 21 2016
pwnall@ - you can ping eae@ or oshima@ for help with css vs. screen pixels
,
Nov 23 2016
,
Nov 29 2016
Do you happen to know if this is a regression?
,
Aug 10
,
Aug 22
I was able to reproduce this issue on Chrome Canary 70.0.3530.0 on MacOS. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 Deleted