fix(input): remain focused in the input after pressing the clear button (#21985)

resolves #21549
This commit is contained in:
Liam DeBeasi
2020-08-27 15:22:40 -04:00
committed by GitHub
parent 22477fb9bf
commit 6878fb9eb9

View File

@ -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 = '';