Make escape work for closing combobox suggestions

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
pull/3322/head
Adam Rutkowski 3 years ago
parent 8349ddc45c
commit 306866d2a1

@ -40,7 +40,12 @@ let suggestionsDropdown = function(id) {
const currentFocus = this.focus
return currentFocus - 1 >= this.leastFocusableIndex() ? currentFocus - 1 : this.maxFocusableIndex()
},
close() { this.isOpen = false },
close(e) {
if (this.isOpen) {
e.stopPropagation()
}
this.isOpen = false
},
select() {
this.$refs[`dropdown-${this.id}-option-${this.focus}`]?.click()
this.close()

Loading…
Cancel
Save