setDragImage with data: url image doesn't work immediately / first time

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
4 years ago
4 years ago

People

(Reporter: dmitry.krekota, Unassigned)

Tracking

({testcase})

33 Branch
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36

Steps to reproduce:

I drawed something in canvas and then exported it to image src. I set the image to setDragImage (HTML5 Drag and Drop). See example with the problem: http://html5samples.appspot.com/canvasToDrag.html


Actual results:

From the first time picture was not on cursor. It work only from the second time.


Expected results:

Picture should have appeared on cursor from the first time.
This works for me on 34 beta, by which I mean when I drag one of the 4 images to the bottom box, I see the image underneath the cursor. Can you clarify if you can reproduce on 34 and/or exactly what the problem is?
Flags: needinfo?(dmitry.krekota)
(Reporter)

Comment 2

4 years ago
This doesn't work for me on 34 beta too. To see the problem you need to select 2 or 3 or 4 images and try to drag them. It works only from the second time.
One picture drags normal from the first time, because HTML5 canvas is not draw custom picture for drag.
Flags: needinfo?(dmitry.krekota)
(In reply to Dmitry Krekota from comment #2)
> This doesn't work for me on 34 beta too. To see the problem you need to
> select 2 or 3 or 4 images and try to drag them.

Ah. This wasn't in the steps to reproduce... please be detailed when filing a bug report. :-(

> It works only from the
> second time.
> One picture drags normal from the first time, because HTML5 canvas is not
> draw custom picture for drag.

It /looks/ like Chrome updates the dragimage when the image you've passed has fully loaded, whereas gecko doesn't, but I'm not sure.
Component: Untriaged → Drag and Drop
Keywords: testcase
OS: Windows 8.1 → All
Product: Firefox → Core
Hardware: x86_64 → All
Summary: Using HTML5 Canvas with Drag and Drop (setDragImage) → setDragImage with data: url image doesn't work immediately / first time
(In reply to :Gijs Kruitbosch from comment #3)
> (In reply to Dmitry Krekota from comment #2)
> > This doesn't work for me on 34 beta too. To see the problem you need to
> > select 2 or 3 or 4 images and try to drag them.
> 
> Ah. This wasn't in the steps to reproduce... please be detailed when filing
> a bug report. :-(

Also note that to "select" images, you need to click them (they'll get a bit bigger).
You need to log in before you can comment on or make changes to this bug.