chat: Move click handler setup to init()

This commit is contained in:
Richard Hansen 2021-10-25 19:48:54 -04:00
parent c8dbf35fe4
commit 195a6bd81b

View file

@ -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(); if (!isHistoryAdd) this.scrollDown();
}, },
init(pad) { init(pad) {
@ -224,6 +218,11 @@ exports.chat = (() => {
return false; 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; const self = this;
$('body:not(#chatinput)').on('keypress', function (evt) { $('body:not(#chatinput)').on('keypress', function (evt) {