Chat box not deselecting when I click outside it

Maybe this:

/run local cb = ChatFrame1EditBox cb:SetScript("OnEditFocusLost", nil) UIParent:HookScript("OnEvent", function(self, event)  if event == "GLOBAL_MOUSE_UP" and cb:IsShown() and not cb:IsMouseOver() then cb:ClearFocus() end end)

You’ll have to /reload before using if you have any other script in place

If you want the EditFocusLost processing re-enabled after clicking it will require some extra code and for it to be moved to an addon (which you will probably want to do anyway if it works).

4 Likes