-Fixed an issue where the editbox would sometimes interfere with clicking the tabs.
Xruptor [01-04-11 - 20:14]
-Fixed an issue where the editbox would sometimes interfere with clicking the tabs.
diff --git a/ChatInputTop.lua b/ChatInputTop.lua
index c86ff10..abd17f9 100644
--- a/ChatInputTop.lua
+++ b/ChatInputTop.lua
@@ -10,11 +10,19 @@ eventFrame:SetScript("OnEvent", function(self, event, ...)
end
for i = 1, NUM_CHAT_WINDOWS do
+ local n = ("ChatFrame%d"):format(i)
local eb = _G[("ChatFrame%dEditBox"):format(i)]
eb:ClearAllPoints()
eb:SetPoint("BOTTOMLEFT", ("ChatFrame%d"):format(i), "TOPLEFT", -5, 0)
eb:SetPoint("BOTTOMRIGHT", ("ChatFrame%d"):format(i), "TOPRIGHT", 5, 0)
+
+ --when the editbox is on the top, complications occur because sometimes you are not allowed to click on the tabs.
+ --to fix this we'll just make the tab close the editbox
+ --also force the editbox to hide itself when it loses focus
+ _G[n.."Tab"]:HookScript("OnClick", function() eb:Hide() end)
+ eb:HookScript("OnEditFocusLost", function(self) self:Hide() end)
+
end
eventFrame:UnregisterEvent("ADDON_LOADED")
diff --git a/ChatInputTop.toc b/ChatInputTop.toc
index 8e3f421..7f6e706 100644
--- a/ChatInputTop.toc
+++ b/ChatInputTop.toc
@@ -1,6 +1,6 @@
## Interface: 40000
## Title: ChatInputTop
## Author: Xruptor
-## Version: 1.4
+## Version: 1.5
## Notes: All this does is move the input box to the top when typing in the chat frame.
ChatInputTop.lua