From 9836034fdb142abd30bcdeb87ac168d54351ac08 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 18 Mar 2024 10:58:33 +0000 Subject: [PATCH] Refactor #5426 - For Dropdown --- components/lib/dropdown/Dropdown.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index 0cda9406d..e9785fb27 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -305,7 +305,7 @@ export default { this.overlayVisible = true; this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.editable ? -1 : this.findSelectedOptionIndex(); - isFocus && DomHandler.focus(this.$refs.focusInput.$el ? this.$refs.focusInput.$el : this.$refs.focusInput); + isFocus && DomHandler.focus(this.editable ? this.$refs.focusInput.$el : this.$refs.focusInput); }, hide(isFocus) { const _hide = () => { @@ -316,7 +316,7 @@ export default { this.searchValue = ''; this.resetFilterOnHide && (this.filterValue = null); - isFocus && DomHandler.focus(this.$refs.focusInput.$el ? this.$refs.focusInput.$el : this.$refs.focusInput); + isFocus && DomHandler.focus(this.editable ? this.$refs.focusInput.$el : this.$refs.focusInput); }; setTimeout(() => {