Fixes #47, Dragging attachment to item removes search results

This commit is contained in:
Dan Stillman 2013-02-04 04:08:34 -05:00
parent 194343cb0f
commit e2ea7532ba

View file

@ -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;