Open Bug 1449793 Opened 7 years ago Updated 3 years ago

In cross-frame drag & drop, effectAllowed and dropEffect in dataTransfer are lost

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect, P3)

59 Branch
defect

Tracking

()

Tracking Status
firefox59 --- affected
firefox60 --- affected
firefox61 --- affected

People

(Reporter: javascriptjedi, Unassigned)

Details

Attachments

(1 file)

Attached file dragEvents.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20180315163333 Steps to reproduce: * Place attached HTML in web container, and then load it into two different Firefox windows * Select and Drag & Drop text from blue box into red box in same window Event.dataTransfer properties dropEffect and effectAllowed will correctly be logged to console as "copy" * Select and Drag & Drop text from blue box into red box in the other window Now dropEffect will be "move" and effectAllowed will be "uninitialized" Note you MUST use a web container to reproduce this. It won't reproduce if you load from local file using a file:/// URL. I used a webcontainer with the port 8080. Actual results: dropEffect and effectAllowed fields of Event.transferData aren't what was stored in an actual cross-frame drag & drop Expected results: dropEffect and effectAllowed should both be "copy" Note that this works in Firefox 52 ESR - so that you get "copy" for both properties in a cross-frame drag & drop. It appears to have broken in FF 57. I'm reporting it against FF59.
Note that, you can reproduce by opening the attachment above (where it says "attachment 8963431 [details]") in two Firefox windows. Note how both properties are "copy" when you drag & drop inside the same window, but are "uninitialized" and "move" cross frame. The actual drop itself may or may not fail - that's not what I'm reporting as a bug. I'm reporting the wrong attributes in transferData in the dragOver() handler, *before* the mouse button is released. You can actually reproduce without releasing the button over the target.
This may be a bug in the way the cross-origin rules are applied. In the repro case, the two pages have the exact same URL, so you wouldn't think there would be any cross origin issue, right? (As a test of that theory, one would simply have to install a plugin to disable cross-origin enforcement.)
Summary: In cross-frame drag & drop, effectAllowed and dropEffect in transferData are lost → In cross-frame drag & drop, effectAllowed and dropEffect in dataTransfer are lost
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 (20180323154952) I have tested and reproduced this issue using the steps above on Windows 10 with latest Nightly and Fx Release builds. When open the attachment in two windows I`m able to drag&drop between both windows. If I try to drag&drop in the same window I`m unable to do so. When doing so I can see the following entries in the browser:console: DragOver: effectAllowed=copy, dropEffect=copy DragOver: effectAllowed=uninitialized, dropEffect=move I think the right component for this report would be Core::Drag and Drop. Please change if this is not the right component.
Status: UNCONFIRMED → NEW
Component: Untriaged → Drag and Drop
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Presumably, we aren't transfering the effectAllowed across to the child processes.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: