From 40b9e3578f895b202100242643a5a7319bf528f7 Mon Sep 17 00:00:00 2001 From: Jason Cassidy <47318351+jcassidyav@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:46:52 +0000 Subject: [PATCH] fix(ios): ensure autocorrect not applied silently on IOS16 (#10032) --- packages/core/ui/editable-text-base/index.ios.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/ui/editable-text-base/index.ios.ts b/packages/core/ui/editable-text-base/index.ios.ts index 031de38a0..df6f436d2 100644 --- a/packages/core/ui/editable-text-base/index.ios.ts +++ b/packages/core/ui/editable-text-base/index.ios.ts @@ -214,15 +214,21 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { } [autocorrectProperty.setNative](value: boolean | number) { let newValue: UITextAutocorrectionType; + let spelling: UITextSpellCheckingType; + if (typeof value === 'number') { newValue = UITextAutocorrectionType.Default; + spelling = UITextSpellCheckingType.Default; } else if (value) { newValue = UITextAutocorrectionType.Yes; + spelling = UITextSpellCheckingType.Yes; } else { newValue = UITextAutocorrectionType.No; + spelling = UITextSpellCheckingType.No; } this.nativeTextViewProtected.autocorrectionType = newValue; + this.nativeTextViewProtected.spellCheckingType = spelling; } public setSelection(start: number, stop?: number) { const view = this.nativeTextViewProtected;