Disabling left click and right click on the chat edit box. - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-15-20, 06:27 PM   #1
A Defias Bandit
Join Date: Jul 2020
Posts: 2
Disabling left click and right click on the chat edit box.

Hello there !

I've been writing my own UI last month to get rid of many addons. But here's my final boss.

I was set up like this before and got used by my edit box at center of the screen.
But sometimes i accidentally click on this space of the screen, opening chat box and writing "qqqqqqqqqqqqqqqdddddddddq" while being in raid. I'm looking for a way to disable clicking to open my edit chatbox and just using enter to do it.

I've been looking into this : https://github.com/Gethe/wow-ui-sour.../ChatFrame.lua

Found :

function ChatFrame_OpenChat(text, chatFrame, desiredCursorPosition)
if chatFrame == nil and CHAT_FOCUS_OVERRIDE ~= nil then
if CHAT_FOCUS_OVERRIDE.supportsSlashCommands or not text or strsub(text, 0, 1) ~= "/" then
if text then

local editBox = ChatEdit_ChooseBoxForSend(chatFrame);

editBox.desiredCursorPosition = desiredCursorPosition;

if text then
editBox.text = text;
editBox.setText = 1;

if ( editBox:GetAttribute("chatType") == editBox:GetAttribute("stickyType") ) then
if ( (editBox:GetAttribute("stickyType") == "PARTY") and (not IsInGroup(LE_PARTY_CATEGORY_HOME)) or
(editBox:GetAttribute("stickyType") == "RAID") and (not IsInRaid(LE_PARTY_CATEGORY_HOME)) or
(editBox:GetAttribute("stickyType") == "INSTANCE_CHAT") and (not IsInGroup(LE_PARTY_CATEGORY_INSTANCE))) then
editBox:SetAttribute("chatType", "SAY");

return editBox;
But still, cannot find a way.

Hit me up if you have a hint.

Last edited by HolyAA : 07-15-20 at 07:30 PM. Reason: Added code lines.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Disabling left click and right click on the chat edit box.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off