the only block of code I can see that may be causing the problem is ..
CastGlyph command perhaps?
Lua Code:
517.function GlyphFrameSpell_OnClick (self, button)
518. if ( IsModifiedClick("CHATLINK") ) then
519. local _, _, _, _, _, link = GetGlyphInfo(self.glyphIndex);
520. if ( link ) then
521. ChatEdit_InsertLink(link);
522. end
523. else
524. if self.disabledBG:IsShown() then
525. return;
526. end
527. CastGlyph(self.glyphIndex);
528. StaticPopup_Hide("CONFIRM_GLYPH_PLACEMENT");
529. end
530.end