Open Bug 1238471 Opened 5 years ago Updated 5 years ago

event.dataTransfer.setDragImage(image, xOffset, yOffset);

Categories

(Core :: DOM: Events, defect)

43 Branch
Unspecified
macOS
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: ggeorgiev, Unassigned, NeedInfo)

References

()

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

Steps to reproduce:

using 
event.dataTransfer.setDragImage(image, xOffset, yOffset); 
with xOffset = imageWidth/2 & yOffset=imageHeight/2 to shift mouse pointer in the middle of the dragged image 


Actual results:

pointer shifted not in the middle


Expected results:

pointer shall move to the middle of the image

the above happens when xOffset=imageWidth & yOffset=imageHeight
the function works with Chrome and Safari as expected
OS: Unspecified → Mac OS X
Component: Untriaged → DOM: Events
Product: Firefox → Core
Attach a testcase, please.
Flags: needinfo?(ggeorgiev)
Find above URL where reported bug can be seen in compare with chrome, safari
The function is used in code:

function drag(event) {
        event.dataTransfer.setData("text", event.target.id); 
	event.dataTransfer.setDragImage(event.target,cs/2,cs/2);      
	event.dataTransfer.effectAllowed = "move";  
};
// cs is the size of the image
Flags: needinfo?(ggeorgiev)
Please post a testcase to bugzilla. The linked URL is no longer valid.
Flags: needinfo?(ggeorgiev)
You need to log in before you can comment on or make changes to this bug.