Thread Tools Display Modes
10-02-16, 07:40 PM   #1
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Fixing the chat

http://us.battle.net/forums/en/wow/topic/20748605404

Does anyone here have enough knowledge on how the default chat frame works to know if this is something we could fix via add-ons?
This has been driving me (and many others) crazy since pre-patch dropped and it's still not been fixed, and I've yet to see it being publicly acknowledged by someone at Blizzard.

If we could fix that on our own without having to wait for Blizzard to maybe fix it on their end, that would be amazing and also really appreciated. :s
  Reply With Quote
10-02-16, 09:36 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Is it fixable by an addon? Yes, pretty easily. You'd just need to hook the "open a chat edit box" function (I don't know its name offhand), find the last whisper received in the currently visible chat frame, and update the edit box accordingly.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-03-16, 07:08 AM   #3
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Sounds relatively straightforward, would still need to fix it for the General chat tab too though.

If I switch to a whisper tab and talk to that person, switching back to General tab should put me back in whichever channel it was I was talking in, be it /say, General, Trade /i, etc.

How can we figure out which chat channel the player last spoke in?

Also like that thread mentions it looks like clicking the tab a few times "corrects" the chat focus, so the code for it must already be there but just not working properly... maybe that'd make it easier to figure out.

Last edited by Ammako : 10-03-16 at 08:21 AM.
  Reply With Quote
10-05-16, 06:33 PM   #4
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
This seems to fix it:

Code:
hooksecurefunc("FCF_Tab_OnClick", function(self, button)
    local chatFrame = _G["ChatFrame"..self:GetID()];
    if ( GetCVar("chatStyle") ~= "classic" ) then
        ChatEdit_SetLastActiveWindow(chatFrame.editBox);
    end
end)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Fixing the chat


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