diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 35e8b6d31e..9e25209850 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -276,7 +276,7 @@ var ItemTree = class ItemTree extends LibraryTree { || item.isRegularItem(); }); } - let newSearchItemIDs = new Set(newSearchItems.map(item => item.id)); + let newSearchItemIDs = new Set(newSearchItems.map(item => item.treeViewID)); // Find the items that aren't yet in the tree let itemsToAdd = newSearchItems.filter(item => this._rowMap[item.treeViewID] === undefined); // Find the parents of search matches @@ -318,7 +318,7 @@ var ItemTree = class ItemTree extends LibraryTree { skipChildren = false; } // Skip items that don't match the search and don't have children that do - if (!newSearchItemIDs.has(row.ref.id) && !isSearchParent) { + if (!newSearchItemIDs.has(row.ref.treeViewID) && !isSearchParent) { continue; } } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index c3fc74eae4..bbe9ae7148 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1949,7 +1949,7 @@ var ZoteroPane = new function() // Check if selection has actually changed. The onselect event that calls this // can be called in various situations where the selection didn't actually change, // such as whenever selectEventsSuppressed is set to false. - var ids = selectedItems.map(item => item.id); + var ids = selectedItems.map(item => item.treeViewID); ids.sort(); if (ids.length && Zotero.Utilities.arrayEquals(_lastSelectedItems, ids)) { return false;