diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml index 246601befc..6de05ad71a 100644 --- a/chrome/content/zotero/bindings/zoterosearch.xml +++ b/chrome/content/zotero/bindings/zoterosearch.xml @@ -440,6 +440,10 @@ var operators = condition.operators; conditionsMenu.value = conditionName; + // Store in attribute as well because the value doesn't get set properly when + // the value is from a menuitem in the More menu, and we need this to select + // the previous condition when creating a new row + conditionsMenu.setAttribute('data-value', conditionName); // Parent state isn't set automatically for submenu selections if (!this.isPrimaryCondition(conditionName)) { @@ -814,7 +818,7 @@ if (this.parent){ let ref = this.parent.search.getCondition( this.parent.search.addCondition( - this.id('conditionsmenu').value, + this.id('conditionsmenu').getAttribute('data-value'), this.id('operatorsmenu').value, "" )