Text input is no longer automatically enabled when initializing video.

Fixes https://github.com/libsdl-org/SDL/issues/9309
Fixes https://github.com/libsdl-org/SDL/issues/9268
This commit is contained in:
Sam Lantinga
2024-03-23 09:21:28 -07:00
parent 6604d423fd
commit 72fc6f86e5
11 changed files with 41 additions and 62 deletions

View File

@@ -828,7 +828,7 @@ static EM_BOOL Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent
is_nav_key = SDL_TRUE;
}
if ((eventType == EMSCRIPTEN_EVENT_KEYDOWN) && SDL_EventEnabled(SDL_EVENT_TEXT_INPUT) && !is_nav_key) {
if ((eventType == EMSCRIPTEN_EVENT_KEYDOWN) && SDL_TextInputActive() && !is_nav_key) {
prevent_default = SDL_FALSE;
}