Update select.vue
This commit is contained in:
parent
33c826ec16
commit
5f25fecafb
1 changed files with 9 additions and 6 deletions
|
@ -639,12 +639,15 @@
|
||||||
// in 'AutoComplete', when set an initial value asynchronously,
|
// in 'AutoComplete', when set an initial value asynchronously,
|
||||||
// the 'dropdown list' should be stay hidden.
|
// the 'dropdown list' should be stay hidden.
|
||||||
// [issue #5150]
|
// [issue #5150]
|
||||||
|
if (this.autoComplete) {
|
||||||
let isInputFocused =
|
let isInputFocused =
|
||||||
document.hasFocus &&
|
document.hasFocus &&
|
||||||
document.hasFocus() &&
|
document.hasFocus() &&
|
||||||
document.activeElement === this.$el.querySelector('input');
|
document.activeElement === this.$el.querySelector('input');
|
||||||
|
|
||||||
this.visible = isInputFocused;
|
this.visible = isInputFocused;
|
||||||
|
} else {
|
||||||
|
this.visible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.query = query;
|
this.query = query;
|
||||||
|
|
Loading…
Add table
Reference in a new issue