From e0a9756b96d9560cb58f232ac47d19c9071786fd Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sat, 7 Mar 2026 19:49:04 +0100 Subject: [PATCH] clearfocus fix --- modules/bags.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/bags.lua b/modules/bags.lua index b248f687..d2ea5173 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -1070,6 +1070,27 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () end end end) + + frame.search.edit:SetScript("OnLeave", function() + if GetMouseFocus() ~= this then + this:ClearFocus() + end + end) + + frame.search:SetScript("OnHide", function() + frame.search.edit:SetText(T["Search"]) + for bag = -2, 11 do + if pfUI.bags[bag] then + local bagsize = GetContainerNumSlots(bag) + if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end + for slot = 1, bagsize do + if pfUI.bags[bag] and pfUI.bags[bag].slots[slot] then + pfUI.bags[bag].slots[slot].frame:SetAlpha(1) + end + end + end + end + end) end else -- bankframe