diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index b52c8abd..48c18614 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -27,6 +27,7 @@ #include "game/expansion_profile.hpp" #include "core/logger.hpp" #include +#include #include #include #include @@ -1061,7 +1062,9 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) { ImGuiInputTextFlags inputFlags = ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackAlways; if (ImGui::InputText("##ChatInput", chatInputBuffer, sizeof(chatInputBuffer), inputFlags, inputCallback, this)) { sendChatMessage(gameHandler); - refocusChatInput = true; + // Close chat input on send so movement keys work immediately. + refocusChatInput = false; + ImGui::ClearActiveID(); } ImGui::PopStyleColor();