Fix empty composing range on iOS (flutter/engine#10381)
This commit is contained in:
committed by
GitHub
parent
c7b8d8d11f
commit
f9e3a16668
@@ -591,8 +591,9 @@ static UIReturnKeyType ToUIReturnKeyType(NSString* inputType) {
|
||||
NSUInteger selectionBase = ((FlutterTextPosition*)_selectedTextRange.start).index;
|
||||
NSUInteger selectionExtent = ((FlutterTextPosition*)_selectedTextRange.end).index;
|
||||
|
||||
NSUInteger composingBase = 0;
|
||||
NSUInteger composingExtent = 0;
|
||||
// Empty compositing range is represented by the framework's TextRange.empty.
|
||||
NSInteger composingBase = -1;
|
||||
NSInteger composingExtent = -1;
|
||||
if (self.markedTextRange != nil) {
|
||||
composingBase = ((FlutterTextPosition*)self.markedTextRange.start).index;
|
||||
composingExtent = ((FlutterTextPosition*)self.markedTextRange.end).index;
|
||||
|
||||
Reference in New Issue
Block a user