From e4ba5680982ebfe544703d79a881b1d640b6b934 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Thu, 28 Nov 2019 07:34:40 +0900 Subject: [PATCH] Revert "Do not default to downstream affinity on iOS insertText (#13852)" (flutter/engine#14053) This reverts commit ffe1d3fca6199594535967cf9c05fb4a7ee7cc27. --- .../darwin/ios/framework/Source/FlutterTextInputPlugin.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index f22fb51b42..ad39e710ee 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -621,9 +621,7 @@ static UIReturnKeyType ToUIReturnKeyType(NSString* inputType) { } - (void)insertText:(NSString*)text { - // The affinity is unknown here. Set to "" so that Flutter interprets it - // as ambiguous and uses a fallback affinity. - _selectionAffinity = ""; + _selectionAffinity = _kTextAffinityDownstream; [self replaceRange:_selectedTextRange withText:text]; }