dropdown: close when receiving a value
This commit is contained in:
parent
500fbe384c
commit
589625b9fe
1 changed files with 6 additions and 0 deletions
|
|
@ -93,6 +93,12 @@ class Dropdown extends Widget {
|
|||
|
||||
if (!options.fromLocal) this.select.selectedIndex = i + 1
|
||||
|
||||
if (document.activeElement === this.select) {
|
||||
// force menu close
|
||||
this.select.blur()
|
||||
this.select.focus()
|
||||
}
|
||||
|
||||
if (options.send) this.sendValue()
|
||||
if (options.sync) this.changed(options)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue