Skip to content

Commit 0d60e1a

Browse files
authored
Do not default to downstream affinity on iOS insertText (flutter#13852)
1 parent 9c68366 commit 0d60e1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,9 @@ - (BOOL)hasText {
621621
}
622622

623623
- (void)insertText:(NSString*)text {
624-
_selectionAffinity = _kTextAffinityDownstream;
624+
// The affinity is unknown here. Set to "" so that Flutter interprets it
625+
// as ambiguous and uses a fallback affinity.
626+
_selectionAffinity = "";
625627
[self replaceRange:_selectedTextRange withText:text];
626628
}
627629

0 commit comments

Comments
 (0)