-- Clear search focus when clicking toolbar local searchBox = getglobal("Guda_BagFrame_SearchBar_SearchBox") if searchBox then searchBox:ClearFocus() end if this:GetText() == "Search, try ~equipment" then this:SetText("") this:SetTextColor(1, 1, 1, 1) end -- Show click catcher to detect clicks outside bag local clickCatcher = getglobal("Guda_ClickCatcher") if clickCatcher then clickCatcher:Show() end -- Hide click catcher when focus is lost local clickCatcher = getglobal("Guda_ClickCatcher") if clickCatcher then clickCatcher:Hide() end -- Restore placeholder if empty when focus is lost if this:GetText() == "" then this:SetText("Search, try ~equipment") this:SetTextColor(0.5, 0.5, 0.5, 1) Guda_BagFrame_OnSearchChanged(this) end Guda_BagFrame_OnSearchChanged(this) this:SetText("Search, try ~equipment") this:SetTextColor(0.5, 0.5, 0.5, 1) this:ClearFocus() Guda_BagFrame_OnSearchChanged(this) -- Set tooltip handlers on money button children Guda_BagFrame_MoneyFrame_OnLoad(this) -- Clear search focus when clicking in item area local searchBox = getglobal("Guda_BagFrame_SearchBar_SearchBox") if searchBox then searchBox:ClearFocus() end Guda_BagFrame_OnLoad(this) Guda_BagFrame_OnShow(this) Guda_BagFrame_OnHide(this) -- Clear search box focus when clicking on bag frame (1.12.1 safe) local searchBox = getglobal("Guda_BagFrame_SearchBar_SearchBox") if searchBox then searchBox:ClearFocus() end if (arg1 == "LeftButton") then this:StartMoving() end this:StopMovingOrSizing()