Closed Bug 1398883 Opened 7 years ago Closed 7 years ago

Disable the DataTransfer::Protected state for Firefox 57

Categories

(Core :: DOM: Events, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 + fixed

People

(Reporter: miketaylr, Assigned: nika)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

Originally reported on webcompat.com:

STR:

1. be on irccloud.com, logged in
2. drop an image into the window

expected: 
get upload dialog

actual:
nothing



15:25.23 INFO: Narrowed inbound regression window from [d8ce2633, 5a69e957] (3 builds) to [814746fc, 5a69e957] (2 builds) (~1 steps left)
15:25.23 INFO: No more inbound revisions, bisection finished.
15:25.23 INFO: Last good revision: 814746fc67081ba90d2b2b8b32cf3e0590b650b0
15:25.23 INFO: First bad revision: 5a69e957b1986e6c2e8ae073dce7c8db5c2f5d9d
15:25.23 INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=814746fc67081ba90d2b2b8b32cf3e0590b650b0&tochange=5a69e957b1986e6c2e8ae073dce7c8db5c2f5d9d
(Note, this reproduces for me on OSX, I didn't test other platforms)

[Tracking Requested - why for this release]:

drag and drop functionality broken for irccloud.com
Flags: needinfo?(michael)
Assignee: nobody → michael
Flags: needinfo?(michael)
Summary: Drag & drop image upload broken on irccloud.com → Disable the DataTransfer::Protected state for Firefox 57
This isn't a super essential feature, and is just a change to try to bring us in
line with chromium and the spec. As this has apparent web compat issues, and
DataTransfer is a hard to test area, this patch moves the changes behind a pref,
which we can come back to turning on after we ship 57.
Attachment #8906734 - Flags: review?(amarchesini)
Attachment #8906734 - Flags: review?(amarchesini) → review+
I should add a note - the original problem here is that while Chrome does something very close to what I was trying to do with my patches, there was one small difference which caused irccloud's drag and drop code to break.

Namely, if you ran code like the following:

```
function ondrop(evt) {
    let f = evt.dataTransfer.files;
    setTimeout(() => {
        console.log(f.length);
    }, 0);
}
```

in chrome, the `files` list is just disconnected from the DataTransfer, and never cleared, while my code actually clears the list. I think the spec expects it to act more like how my code works, but I'll have to look into it more in the future if we decide to pref this on again.
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/81c5d6a86610
Disable the DataTransfer::Protected state for Firefox 57, r=baku
https://hg.mozilla.org/mozilla-central/rev/81c5d6a86610
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.