diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index 90dc0105d4..ed009642dd 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic TextNotification lastLine; int repetitions; - bool chatEnabled = true; + bool chatEnabled; [ObjectCreator.UseCtor] public IngameChatLogic(Widget widget, OrderManager orderManager, World world, ModData modData, bool isMenuChat, Dictionary logicArgs) @@ -325,7 +325,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (chatEnabled && !chatWasEnabled) { chatText.Text = ""; - if (Ui.KeyboardFocusWidget == null) + if (Ui.KeyboardFocusWidget == null && chatChrome.Visible) chatText.TakeKeyboardFocus(); } else if (!chatEnabled) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 82b1dd55d5..3f3347e5fa 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic MapPreview map; Session.MapStatus mapStatus; - bool chatEnabled = true; + bool chatEnabled; bool addBotOnMapLoad; bool disableTeamChat; bool insufficientPlayerSpawns;