From 1011b963bcc011c962b46030bae7dd8fa1fd465e Mon Sep 17 00:00:00 2001 From: Grim <69561145+LinkIsGrim@users.noreply.github.com> Date: Sun, 23 Jul 2023 07:48:53 +0300 Subject: [PATCH] fix losing interactions with notepad open (#9282) --- addons/interact_menu/functions/fnc_keyDown.sqf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index bcc4340913..2e8f39419f 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -22,7 +22,15 @@ params ["_menuType"]; if (GVAR(openedMenuType) == _menuType) exitWith {true}; // Conditions: Don't open when editing a text box -private _isTextEditing = (allDisplays findIf {(ctrlType (focusedCtrl _x)) == CT_EDIT}) != -1; +private _focusedTextIndex = allDisplays findIf {(ctrlType (focusedCtrl _x)) == CT_EDIT}; +private _isTextEditing = _focusedTextIndex != -1; + +// Map's controls remain open and focused despite map not being visible, workaround +if (_isTextEditing) then { + if (ctrlIDD (allDisplays select _focusedTextIndex) == IDD_MAIN_MAP) then { + _isTextEditing = visibleMap; + }; +}; // Conditions: canInteract (these don't apply to zeus) if (