Skip to content

Commit

Permalink
Do not default to downstream affinity on iOS insertText (flutter#13852)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryQian authored Nov 22, 2019
1 parent 9c68366 commit 0d60e1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,9 @@ - (BOOL)hasText {
}

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

Expand Down

0 comments on commit 0d60e1a

Please sign in to comment.