From 6878fb9eb99c17908f5630019efaa762b5b006e0 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 27 Aug 2020 15:22:40 -0400 Subject: [PATCH] fix(input): remain focused in the input after pressing the clear button (#21985) resolves #21549 --- core/src/components/input/input.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index 6d55057083..e3e37b545e 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -357,6 +357,9 @@ export class Input implements ComponentInterface { if (this.clearInput && !this.readonly && !this.disabled && ev) { ev.preventDefault(); ev.stopPropagation(); + + // Attempt to focus input again after pressing clear button + this.setFocus(); } this.value = '';