From ab23d57011d8bf589f34ea6a0097c852153a7412 Mon Sep 17 00:00:00 2001 From: harundemr Date: Sat, 25 Nov 2023 13:55:49 +0300 Subject: [PATCH] Fix #4509 - Editable dropdown doesn't open when typing on a mobile device --- components/lib/dropdown/Dropdown.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index a97f59e47..60a279a4d 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -317,7 +317,10 @@ export default { this.$emit('blur', event); }, onKeyDown(event) { - if (this.disabled) { + // Android keyboard event + const isAndroidKeyboardEvent = event.isComposing || event.keyCode === 229; + + if (this.disabled || isAndroidKeyboardEvent) { event.preventDefault(); return; @@ -402,6 +405,8 @@ export default { !matched && (this.focusedOptionIndex = -1); this.updateModel(event, value); + + !this.overlayVisible && this.show(); }, onContainerClick(event) { if (this.disabled || this.loading) {