Fix dragging in links on Linux
This commit is contained in:
parent
c43823ad60
commit
172f36d050
1 changed files with 27 additions and 22 deletions
|
@ -2336,7 +2336,8 @@ Zotero.DragDrop = {
|
|||
var ids = dt.getData('zotero/item').split(",");
|
||||
dragData.data = ids;
|
||||
}
|
||||
else if (dt.types.contains('application/x-moz-file')) {
|
||||
else {
|
||||
if (dt.types.contains('application/x-moz-file')) {
|
||||
dragData.dataType = 'application/x-moz-file';
|
||||
var files = [];
|
||||
for (var i=0; i<len; i++) {
|
||||
|
@ -2353,7 +2354,9 @@ Zotero.DragDrop = {
|
|||
}
|
||||
dragData.data = files;
|
||||
}
|
||||
else if (dt.types.contains('text/x-moz-url')) {
|
||||
// This isn't an else because on Linux a link drag contains an empty application/x-moz-file too
|
||||
if (!dragData.data || !dragData.data.length) {
|
||||
if (dt.types.contains('text/x-moz-url')) {
|
||||
dragData.dataType = 'text/x-moz-url';
|
||||
var urls = [];
|
||||
for (var i=0; i<len; i++) {
|
||||
|
@ -2362,6 +2365,8 @@ Zotero.DragDrop = {
|
|||
}
|
||||
dragData.data = urls;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dragData;
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue