Fixed text input in the wrong edit box in Multiplayer server list

This commit is contained in:
Sergii Pylypenko
2021-04-26 00:05:45 +03:00
parent 1c0c2b7345
commit 5b2f316cda
2 changed files with 1 additions and 3 deletions

View File

@@ -825,7 +825,7 @@ void QueryString::HandleEditBox(Window *w, int wid)
if (w->window_class == WC_OSK) w->InvalidateData();
}
#ifdef __ANDROID__
if (SDL_IsScreenKeyboardShown(NULL)) {
if (SDL_IsScreenKeyboardShown(NULL) && w->IsWidgetFocused(wid)) {
if (SDL_ANDROID_GetScreenKeyboardTextInputAsync(_android_text_input, sizeof(_android_text_input)) == SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED) {
this->text.Assign(_android_text_input);
w->OnEditboxChanged(wid);