Do not default to downstream affinity on iOS insertText (flutter/engine#13852)

This commit is contained in:
Gary Qian 2019-11-22 14:02:50 -08:00 committed by GitHub
parent f5c2a1e0ad
commit ffe1d3fca6

View File

@ -621,7 +621,9 @@ static UIReturnKeyType ToUIReturnKeyType(NSString* inputType) {
}
- (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];
}