Fix drag and drop issues on Firefox and Chrome

Review Request #8160 — Created May 12, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
7f21a2c...

Reviewers

In Chrome, the DataTransfer.files attribute will not be have a
Symbol.iterator property, so it cannot be iterated through via
let...of. In Firefox, DataTransfer.types is not an array (instead,
it is a DOMStringList) which does not have the includes function in
its prototype. We solve both of these issues by using Array.from to
coerce these pseudo-arrays into proper array objects before working
on them.

Verified this drag and drop worked in both Firefox and Chrome with this
patch applied.

    Loading...