From a1fecdb9df25bc574d7c84b0fe5633c7913b1397 Mon Sep 17 00:00:00 2001 From: uros Date: Tue, 1 Oct 2024 23:27:37 +0200 Subject: [PATCH] #6420 fix: Select: autoFilterFocus stuck when switching between Selects closes #6420 --- packages/primevue/src/select/Select.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/primevue/src/select/Select.vue b/packages/primevue/src/select/Select.vue index 12ea131dbe..81e8e7503d 100755 --- a/packages/primevue/src/select/Select.vue +++ b/packages/primevue/src/select/Select.vue @@ -689,7 +689,9 @@ export default { this.alignOverlay(); this.scrollInView(); - this.autoFilterFocus && focus(this.$refs.filterInput.$el); + setTimeout(() => { + this.autoFilterFocus && focus(this.$refs.filterInput.$el); + }, 1); }, onOverlayAfterEnter() { this.bindOutsideClickListener(); @@ -705,6 +707,7 @@ export default { this.autoFilterFocus && focus(this.$refs.focusInput); this.$emit('hide'); + this.overlay = null; }, onOverlayAfterLeave(el) {