New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666763 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

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.
 
setdragimage.html
543 bytes View Download

Comment 1 Deleted

Components: Blink>DataTransfer
Labels: Needs-Triage-M54
Cc: sureshkumari@chromium.org
Labels: -Pri-3 -Needs-Triage-M54 M-57 OS-Linux OS-Mac OS-Windows Pri-2
Status: Untriaged (was: Unconfirmed)
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.
666763.mp4
515 KB View Download

Comment 5 by jsb...@chromium.org, Nov 21 2016

Owner: pwnall@chromium.org
Status: Assigned (was: Untriaged)
pwnall@ - you can ping eae@ or oshima@ for help with css vs. screen pixels
Labels: -M-54 Needs-Triage-M54

Comment 7 by pwnall@chromium.org, Nov 29 2016

Do you happen to know if this is a regression?
Owner: ----
Status: Available (was: Assigned)
I was able to reproduce this issue on Chrome Canary 70.0.3530.0 on MacOS.

Sign in to add a comment