Fix intermittent source file deletion when dragging files in on Windows

(at least, if this is caused by what I think it was caused by)

https://forums.zotero.org/discussion/38486/
This commit is contained in:
Dan Stillman 2014-07-20 15:56:55 -04:00
parent 3b5bd45433
commit 15108eea3f

View File

@ -2896,7 +2896,7 @@ Zotero.ItemTreeView.prototype.canDropCheck = function (row, orient, dataTransfer
var itemGroup = this._itemGroup;
if (orient == 0) {
if (row != -1 && orient == 0) {
var rowItem = this._getItemAtRow(row).ref; // the item we are dragging over
}
@ -2904,7 +2904,7 @@ Zotero.ItemTreeView.prototype.canDropCheck = function (row, orient, dataTransfer
var items = Zotero.Items.get(ids);
// Directly on a row
if (orient == 0) {
if (rowItem) {
var canDrop = false;
for each(var item in items) {
@ -2981,7 +2981,7 @@ Zotero.ItemTreeView.prototype.canDropCheck = function (row, orient, dataTransfer
}
else if (dataType == "text/x-moz-url" || dataType == 'application/x-moz-file') {
// Disallow direct drop on a non-regular item (e.g. note)
if (orient == 0) {
if (rowItem) {
if (!rowItem.isRegularItem()) {
return false;
}