Skip to content

Commit 8d2c78b

Browse files
committed
Fixed an issue where opening the Talent Tree UI in combat, and closing it after combat ends, could brick the ESC key
1 parent 030043e commit 8d2c78b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

NoAutoclose.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ function ns:HandleUIPanel(name, info, flippedUiSpecialFrames)
199199
if ((frame.IsProtected and frame:IsProtected()) or uiSpecialFrameBlacklist[name]) then
200200
if InCombatLockdown() then
201201
self:AddToCombatLockdownQueue(ns.HandleUIPanel, ns, name, info, flippedUiSpecialFrames);
202+
setTrue(frame, 'editModeManuallyShown');
202203
return;
203204
end
205+
setNil(frame, 'editModeManuallyShown');
204206

205207
self:ConfigureSecureEscHandler(frame, uiSpecialFrameBlacklist[name]);
206208
end
@@ -283,6 +285,7 @@ function ns:ConfigureSecureEscHandler(frame, alwaysSetBindingOnShow, callRegenDi
283285

284286
self.handlerFrameIndex = self.handlerFrameIndex + 1;
285287
local name = 'Numy_NoAutoClose_SecureEscapeHandlerFrame' .. self.handlerFrameIndex;
288+
--- @class NAP_EscHandler: Button, SecureHandlerShowHideTemplate, SecureHandlerClickTemplate
286289
local escHandler = CreateFrame('Button', name, frame, 'SecureHandlerShowHideTemplate,SecureHandlerClickTemplate');
287290
self.escHandlerMap[frame] = escHandler;
288291

@@ -320,6 +323,9 @@ function ns:ConfigureSecureEscHandler(frame, alwaysSetBindingOnShow, callRegenDi
320323
end
321324
end
322325
]]);
326+
if frame:IsShown() and alwaysSetBindingOnShow then
327+
escHandler:Execute(escHandler:GetAttribute('_onshow'));
328+
end
323329
if callRegenDisabledCode then
324330
escHandlerOnEvent(escHandler, 'PLAYER_REGEN_DISABLED');
325331
end

0 commit comments

Comments
 (0)