fix #5150
This commit is contained in:
parent
de3614371e
commit
33c826ec16
2 changed files with 49 additions and 37 deletions
|
@ -635,7 +635,18 @@
|
|||
}, ANIMATION_TIMEOUT);
|
||||
},
|
||||
onQueryChange(query) {
|
||||
if (query.length > 0 && query !== this.query) this.visible = true;
|
||||
if (query.length > 0 && query !== this.query) {
|
||||
// in 'AutoComplete', when set an initial value asynchronously,
|
||||
// the 'dropdown list' should be stay hidden.
|
||||
// [issue #5150]
|
||||
let isInputFocused =
|
||||
document.hasFocus &&
|
||||
document.hasFocus() &&
|
||||
document.activeElement === this.$el.querySelector('input');
|
||||
|
||||
this.visible = isInputFocused;
|
||||
}
|
||||
|
||||
this.query = query;
|
||||
this.unchangedQuery = this.visible;
|
||||
this.filterQueryChange = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue