From 195a6bd81b2e020326d037ea0e04e94188d44037 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 25 Oct 2021 19:48:54 -0400 Subject: [PATCH] chat: Move click handler setup to `init()` --- src/static/js/chat.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index b62dc13dc..f91623a31 100755 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -203,12 +203,6 @@ exports.chat = (() => { } } }); - - // Clear the chat mentions when the user clicks on the chat input box - $('#chatinput').click(() => { - chatMentions = 0; - Tinycon.setBubble(0); - }); if (!isHistoryAdd) this.scrollDown(); }, init(pad) { @@ -224,6 +218,11 @@ exports.chat = (() => { return false; } }); + // Clear the chat mentions when the user clicks on the chat input box + $('#chatinput').click(() => { + chatMentions = 0; + Tinycon.setBubble(0); + }); const self = this; $('body:not(#chatinput)').on('keypress', function (evt) {