diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index 28121cf27f3..e31ad2a0f4f 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -240,7 +240,11 @@ export class Input implements ComponentInterface { * Used for patterns such as input trimming (removing whitespace), * or input masking. */ - this.nativeInput.value = this.getValue(); + const { selectionStart, selectionEnd } = this.nativeInput; + this.nativeInput.value = this.getValue(); + // TODO: FW-727 Remove this when we drop support for iOS 15.3 + // Set the cursor position back to where it was before the value change + this.nativeInput.setSelectionRange(selectionStart, selectionEnd); } this.emitStyle(); this.ionChange.emit({ value: this.value == null ? this.value : this.value.toString() });