Skip to content

Commit

Permalink
AceConfigDialog-3.0: Don't change keyboard input propagation in comba…
Browse files Browse the repository at this point in the history
…t when showing the popup
  • Loading branch information
funkydude committed Jul 24, 2024
1 parent 7aefe61 commit 96d7664
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")

local MAJOR, MINOR = "AceConfigDialog-3.0", 86
local MAJOR, MINOR = "AceConfigDialog-3.0", 87
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)

if not AceConfigDialog then return end
Expand Down Expand Up @@ -544,6 +544,7 @@ local function GetFuncName(option)
end
end
do
local InCombatLockdown = InCombatLockdown
local frame = AceConfigDialog.popup
if not frame or oldminor < 81 then
frame = CreateFrame("Frame", nil, UIParent)
Expand All @@ -556,13 +557,15 @@ do
frame:SetFrameLevel(100) -- Lots of room to draw under it
frame:SetScript("OnKeyDown", function(self, key)
if key == "ESCAPE" then
self:SetPropagateKeyboardInput(false)
if not InCombatLockdown() then
self:SetPropagateKeyboardInput(false)
end
if self.cancel:IsShown() then
self.cancel:Click()
else -- Showing a validation error
self:Hide()
end
else
elseif not InCombatLockdown() then
self:SetPropagateKeyboardInput(true)
end
end)
Expand Down

0 comments on commit 96d7664

Please sign in to comment.