diff --git a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift index 3504da36af422a..d1680a051851fc 100644 --- a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift +++ b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift @@ -356,8 +356,10 @@ class RCTAztecView: Aztec.TextView { // Replace occurrences of the obj symbol ("\u{FFFC}") textView.text = textView.text?.replacingOccurrences(of: "\u{FFFC}", with: "") - - if let newPosition = textView.position(from: textView.beginningOfDocument, offset: originalPosition) { + + // Detect if cursor is off-by-one and correct, if so + let newPositionOffset = originalPosition > 0 ? originalPosition - 1 : originalPosition + if let newPosition = textView.position(from: textView.beginningOfDocument, offset: newPositionOffset) { // Move the cursor to the correct, new position following dictation textView.selectedTextRange = textView.textRange(from: newPosition, to: newPosition) }