From ab23d57011d8bf589f34ea6a0097c852153a7412 Mon Sep 17 00:00:00 2001 From: harundemr Date: Sat, 25 Nov 2023 13:55:49 +0300 Subject: [PATCH 1/2] 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) { From 225c470d73b11cbfaf4baf4f7194100e34958ac4 Mon Sep 17 00:00:00 2001 From: harundemr Date: Thu, 7 Dec 2023 20:59:01 +0300 Subject: [PATCH 2/2] corrected android device check --- components/lib/dropdown/Dropdown.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index 001170d36..fd13717bc 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -317,10 +317,7 @@ export default { this.$emit('blur', event); }, onKeyDown(event) { - // Android keyboard event - const isAndroidKeyboardEvent = event.isComposing || event.keyCode === 229; - - if (this.disabled || isAndroidKeyboardEvent) { + if (this.disabled || DomHandler.isAndroid()) { event.preventDefault(); return;