mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-04 22:59:49 +00:00
Fixed OTP text entry on iOS (thanks @pipiwoaini!)
Fixes https://github.com/libsdl-org/SDL/issues/13717
This commit is contained in:
@@ -575,6 +575,10 @@ static void SDLCALL SDL_HideHomeIndicatorHintChanged(void *userdata, const char
|
||||
- (void)textFieldTextDidChange:(NSNotification *)notification
|
||||
{
|
||||
if (textField.markedTextRange == nil) {
|
||||
if (isOTPMode && labs((NSInteger)textField.text.length - (NSInteger)committedText.length) != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSUInteger compareLength = SDL_min(textField.text.length, committedText.length);
|
||||
NSUInteger matchLength;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user