diff --git a/chrome/content/zotero/elements/advancedSearchPane.js b/chrome/content/zotero/elements/advancedSearchPane.js index 5a2a648a38..93669520e5 100644 --- a/chrome/content/zotero/elements/advancedSearchPane.js +++ b/chrome/content/zotero/elements/advancedSearchPane.js @@ -127,6 +127,9 @@ } else { this._search = new Zotero.Search(); + // Default a fresh search to top-level items, so a condition on a child + // (e.g. attachment content) maps up to its item without any grouping + this._search.addCondition('resultLevel', 'item'); this._search.addCondition('title', 'contains', ''); } this._searchElem.search = this._search; diff --git a/chrome/content/zotero/elements/zoteroSearch.js b/chrome/content/zotero/elements/zoteroSearch.js index 164603992e..9ae1de255d 100644 --- a/chrome/content/zotero/elements/zoteroSearch.js +++ b/chrome/content/zotero/elements/zoteroSearch.js @@ -38,9 +38,11 @@ class ZoteroSearch extends SearchElementBase { content = MozXULElement.parseXULToFragment(` +