diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index 8322607383..5a9fa4666a 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -302,10 +302,11 @@ export class Input implements ComponentInterface { this.ionFocus.emit(); } - private onKeydown = () => { + private onKeydown = (ev: KeyboardEvent) => { if (this.shouldClearOnEdit()) { // Did the input value change after it was blurred and edited? - if (this.didBlurAfterEdit && this.hasValue()) { + // Do not clear if user is hitting Enter to submit form + if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') { // Clear the input this.clearTextInput(); }