We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 721a461 commit 4ff9524Copy full SHA for 4ff9524
core/src/components/input/input.tsx
@@ -240,7 +240,11 @@ export class Input implements ComponentInterface {
240
* Used for patterns such as input trimming (removing whitespace),
241
* or input masking.
242
*/
243
- this.nativeInput.value = this.getValue();
+ const { selectionStart, selectionEnd } = this.nativeInput;
244
+ this.nativeInput.value = this.getValue();
245
+ // TODO: FW-727 Remove this when we drop support for iOS 15.3
246
+ // Set the cursor position back to where it was before the value change
247
+ this.nativeInput.setSelectionRange(selectionStart, selectionEnd);
248
}
249
this.emitStyle();
250
this.ionChange.emit({ value: this.value == null ? this.value : this.value.toString() });
0 commit comments