Fix adding new advanced search row with More field selected

Broken in 28aa86eb79
This commit is contained in:
Dan Stillman 2019-01-08 04:28:28 -05:00
parent 5a6a772ca2
commit ccdcb1bf72

View file

@ -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,
""
)