mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not default to downstream affinity on iOS insertText (flutter/engine#13852)
This commit is contained in:
parent
f5c2a1e0ad
commit
ffe1d3fca6
@ -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];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user