mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
Manually iterate over DomStringList since chrome and firefox differ on API
(imported from commit fc9c073372f56eb5bcdb463d2d23946df85c4485)
This commit is contained in:
@@ -89,9 +89,20 @@
|
||||
|
||||
function drop(e) {
|
||||
var i;
|
||||
|
||||
function has_type(dom_stringlist, type) {
|
||||
var j;
|
||||
for (j = 0; j < dom_stringlist.length; j++) {
|
||||
if (dom_stringlist[j] === type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < opts.raw_droppable.length; i++) {
|
||||
var type = opts.raw_droppable[i];
|
||||
if (e.dataTransfer.types.indexOf(type) > -1) {
|
||||
if (has_type(e.dataTransfer.types, type)) {
|
||||
opts.rawDrop(e.dataTransfer.getData(type));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user