NEW 37012
dropEffect not set to correct default values in dragenter / dragover
https://bugs.webkit.org/show_bug.cgi?id=37012
Summary dropEffect not set to correct default values in dragenter / dragover
Daniel Cheng
Reported 2010-04-01 22:46:27 PDT
Per the section on the initialization of event.dataTransfer.dropEffect, dropEffect's initial value should not be "none" during dragenter / dragover.
Attachments
Testcase (3.22 KB, text/html)
2010-04-01 22:46 PDT, Daniel Cheng
no flags
Patch (11.30 KB, patch)
2010-04-01 23:15 PDT, Daniel Cheng
no flags
Patch (11.41 KB, application/octet-stream)
2010-04-01 23:35 PDT, Daniel Cheng
no flags
Patch (11.41 KB, patch)
2010-04-01 23:35 PDT, Daniel Cheng
no flags
Patch (11.42 KB, patch)
2010-04-02 00:38 PDT, Daniel Cheng
dcheng: review-
dcheng: commit-queue-
Patch (12.29 KB, patch)
2010-04-04 00:06 PDT, Daniel Cheng
dcheng: review-
dcheng: commit-queue-
Patch (10.98 KB, patch)
2010-04-05 15:22 PDT, Daniel Cheng
abarth: review-
Expanded test page (3.97 KB, text/html)
2010-04-20 18:33 PDT, Daniel Cheng
no flags
drag/drop testcase (1003 bytes, text/html)
2010-04-21 15:38 PDT, Oliver Hunt
no flags
Daniel Cheng
Comment 1 2010-04-01 22:46:56 PDT
Created attachment 52380 [details] Testcase
Daniel Cheng
Comment 2 2010-04-01 23:15:17 PDT
Daniel Cheng
Comment 3 2010-04-01 23:35:09 PDT
Daniel Cheng
Comment 4 2010-04-01 23:35:38 PDT
Daniel Cheng
Comment 5 2010-04-02 00:38:58 PDT
Daniel Cheng
Comment 6 2010-04-04 00:06:21 PDT
Tony Chang
Comment 7 2010-04-04 21:24:20 PDT
Adding bweinstein who I think originally set these values in http://trac.webkit.org/changeset/53287
Daniel Cheng
Comment 8 2010-04-05 15:22:46 PDT
Created attachment 52580 [details] Patch Fix incorrect initialization, remove unnecessary contentEditable handling.
Oliver Hunt
Comment 9 2010-04-05 15:23:44 PDT
Can you please compare the test results with that produced by mozilla?
Daniel Cheng
Comment 10 2010-04-05 15:41:20 PDT
Firefox's behavior differs slightly from the spec: From DOM-initiated drags, if effectAllowed is "all", "copyMove", "linkMove", or "uninitialized", the default dropEffect is "move". Firefox doesn't seem to set effectAllowed to "uninitialized" for drags from text boxes. When dragging links, effectAllowed is set to "uninitialized" but default dropEffect is set to "move".
Daniel Cheng
Comment 11 2010-04-15 14:31:59 PDT
From IRC: < dcheng> olliej: just curious if you're interested in reviewing https://bugs.webkit.org/show_bug.cgi?id=37012 since you commented on it a few days ago. < olliej> dcheng: does the new behaviour match ie? < olliej> dcheng: matching the spec comes secondary to matching what implementations do -- the spec for dnd is mostly an attempt to reverse engineer what browser already did < dcheng> I'll check. Results can be found at http://spreadsheets.google.com/pub?key=tPZ1c0LEi4RBJ2CG4jV13Fw&output=html What's the proper approach here? If you don't mind, I'll update the patch to follow IE behavior and email whatwg@ for clarification on why the spec differs from IE in that respect.
Daniel Cheng
Comment 12 2010-04-20 18:33:30 PDT
Created attachment 53910 [details] Expanded test page
Daniel Cheng
Comment 13 2010-04-20 18:37:24 PDT
Updated the page with information for Firefox and Safari. I also found some interesting issues that seem to be specific to Safari.
Oliver Hunt
Comment 14 2010-04-21 15:38:52 PDT
Created attachment 53997 [details] drag/drop testcase
Ojan Vafai
Comment 15 2010-04-21 16:15:23 PDT
Ian, can you comment on the specced behavior for dropEffect? It seems what's currently specced doesn't match any browser, assuming dcheng's testing was correct of course. Was that intentional? I looked, but couldn't find any relevant discussion on whatwg@ about dropEffect. dcheng, maybe it's worth writing an email to whatwg@ with your data?
Adam Barth
Comment 16 2010-06-20 10:06:28 PDT
Comment on attachment 52580 [details] Patch It looks like this change is blocked on interacting with the whatwg. Ideally, we'd get the spec updated to the desired behavior and the change all the implementations to match. Feel free to re-nominate for review (or to post a new patch) once we've got the spec onboard.
danya.postfactum
Comment 17 2013-01-26 19:07:47 PST
What is the current status of this bug report ?
webkit
Comment 18 2014-08-10 13:01:33 PDT
On reviewing this case, it appears that if the value of datatransfer.effectAllowed is set in dragstart, it is supposed to be retained during the drag, but it's being reset to "all" sometime before the dragenter event. This means that drag sources can't specify that they only allow copying, moving or linking from their data. You may need to solve both of these to actually "fix" this bug.
Note You need to log in before you can comment on or make changes to this bug.