From b66e53ad4bf4cd247782f820e2eca8be3ed495e5 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Mon, 26 Apr 2021 00:05:45 +0300 Subject: [PATCH] Fixed text input in the wrong edit box in Multiplayer server list --- src/misc_gui.cpp | 2 +- todo.txt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index ac0630d040..09a5949862 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -815,7 +815,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); diff --git a/todo.txt b/todo.txt index b49df00990..628517cc1a 100644 --- a/todo.txt +++ b/todo.txt @@ -7,8 +7,6 @@ - Two-finger cancel action does not work when confirmation dialog is disabled. -- Unable to search for server, input text in wrong box. https://github.com/pelya/openttd-android/issues/5 - - Cannot click on a depot if scroll mode is set to VSM_VIEWPORT_RMB_FIXED. https://github.com/pelya/openttd-android/issues/3 - Cannot build depots when confirmation dialog is disabled.