Fixes #47, Dragging attachment to item removes search results
This commit is contained in:
parent
194343cb0f
commit
e2ea7532ba
1 changed files with 13 additions and 2 deletions
|
@ -599,10 +599,21 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData)
|
|||
// Otherwise re-run the search, which refreshes the item list
|
||||
else
|
||||
{
|
||||
// For item adds, clear quicksearch
|
||||
// For item adds, clear the quicksearch, unless all the new items
|
||||
// are child items
|
||||
if (activeWindow && type == 'item') {
|
||||
var clear = false;
|
||||
var items = Zotero.Items.get(ids);
|
||||
for each(var item in items) {
|
||||
if (!item.getSource()) {
|
||||
clear = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (clear) {
|
||||
quicksearch.value = '';
|
||||
}
|
||||
}
|
||||
quicksearch.doCommand();
|
||||
madeChanges = true;
|
||||
sort = true;
|
||||
|
|
Loading…
Reference in a new issue