fix(input): prevent input from losing focus when tapping clear button (#18004)

fixes #18002
This commit is contained in:
konnectappdev
2019-04-16 16:01:56 +02:00
committed by Liam DeBeasi
parent 11aa48c83c
commit 29bb4fcb05

View File

@ -307,7 +307,12 @@ export class Input implements ComponentInterface {
} }
} }
private clearTextInput = () => { private clearTextInput = (ev?: Event) => {
if (this.clearInput && !this.readonly && !this.disabled && ev) {
ev.preventDefault();
ev.stopPropagation();
}
this.value = ''; this.value = '';
} }