Skip to content

Commit

Permalink
mpcombobox: blur emits change if value changed
Browse files Browse the repository at this point in the history
behave in the same way as the combobox in earlier versions
  • Loading branch information
ttyridal committed Nov 28, 2021
1 parent 66988be commit baf5110
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/webextension/src/browser_action/mpcombobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ class ComboBox extends HTMLElement {
}

handleBlur() {
this.inputNode.value = this.original_value;
if (this.inputNode.value != this.original_value)
this.setValue(this.inputNode.value);
setTimeout(this.listbox.open.bind(this.listbox, false), 300);
}

Expand Down Expand Up @@ -382,7 +383,7 @@ class ComboBox extends HTMLElement {
event.stopPropagation();
}
break;
case 'Escape':
case 'Escape': // doesn't work on firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1443758
this.inputNode.value = this.original_value;
this.listbox.open(false);
this.inputNode.blur();
Expand Down

0 comments on commit baf5110

Please sign in to comment.