Skip to content

Commit

Permalink
Fix #5014
Browse files Browse the repository at this point in the history
The TextBoxWidget relies under the hood on IGUIEditBox and behaves in a peculiar way. How exactly both the 'send' button and the chat box could be simultaneously active is unclear beyond involving use of both keyboard and mouse, and the underlying issue will likely remain until a deeper overhaul.

In the meantime, simply selecting back the chatbox after the send box has been triggered ensures that at most one line will be affected, and is convenient in other situations where the send box is used.
  • Loading branch information
Alayan-stk-2 committed Jan 8, 2025
1 parent ac3bf83 commit e2b2a1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/states_screens/online/networking_lobby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ void NetworkingLobby::eventCallback(Widget* widget, const std::string& name,
{
onEnterPressed(m_chat_box->getText());
m_chat_box->setText("");
m_chat_box->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
} // send chat message
else if (name == m_emoji_button->m_properties[PROP_ID] &&
!ScreenKeyboard::isActive())
Expand Down

0 comments on commit e2b2a1c

Please sign in to comment.