Use UIKeyboardTypeDecimalPad for number fields on iOS

Fixes https://github.com/libsdl-org/SDL/issues/12025
This commit is contained in:
Sam Lantinga 2025-01-20 09:09:57 -08:00
parent 90b2e2527e
commit f8040b2e01

View file

@ -411,7 +411,7 @@ static void SDLCALL SDL_HideHomeIndicatorHintChanged(void *userdata, const char
textField.textContentType = UITextContentTypePassword; textField.textContentType = UITextContentTypePassword;
break; break;
case SDL_TEXTINPUT_TYPE_NUMBER: case SDL_TEXTINPUT_TYPE_NUMBER:
textField.keyboardType = UIKeyboardTypeNumberPad; textField.keyboardType = UIKeyboardTypeDecimalPad;
textField.textContentType = nil; textField.textContentType = nil;
break; break;
case SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN: case SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN: