When clicking on either an item or spell link in chat, you get a tooltip for it; when clicking on it again, the tooltip closes.
On the other hand, clicking on a talent link shows the tooltip, but clicking on it again does nothing, so the tooltip doesn't wanna close.
How can I hook an event something like:
function OnHyperlinkClick(link, tooltip)
if linkType == "talent" and tooltip.id = link.id --our talent tooltip is visible
Help me out, just want to fix an annoying problem hehe....
It does this with Enchanting links too.
The function you'd want to hook or replace is ChatFrame_OnHyperlinkShow().
function ChatFrame_OnHyperlinkShow(self, link, text, button)
if ItemRefTooltip:IsShown() then
if ItemRefTooltip.GetItem then
local _, nlink = ItemRefTooltip:GetItem()
if link == nlink then
SetItemRef(link, text, button);
Hmm thanks for the help egingell, but it actually didn't work. On the other hand I attached at the end of my addon. The result per se is that nothing changed, except for that trade skill links where unclickable (those that show which recipes one has learned).
I put your code just before the last line of the addon, which is:
It's an addon that puts an icon to spell and item tooltips.