mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Correct behaviour for rangeForCharacterAtIndex (flutter/engine#4319)
Previously it always fell through to a zero-length character range at the specified position.
This commit is contained in:
parent
9365d7465e
commit
5c6abf1dbb
@ -338,7 +338,7 @@ static UITextAutocapitalizationType ToUITextAutocapitalizationType(NSString* inp
|
||||
* text. */
|
||||
- (NSRange)rangeForCharacterAtIndex:(NSUInteger)index {
|
||||
if (index < self.text.length)
|
||||
[self.text rangeOfComposedCharacterSequenceAtIndex:index];
|
||||
return [self.text rangeOfComposedCharacterSequenceAtIndex:index];
|
||||
return NSMakeRange(index, 0);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user