fix parent clicks

isekai-main
Barış Soner Uşaklı 1 year ago
parent 8132d36be1
commit d45c1b0073

@ -173,8 +173,10 @@ define('forum/chats', [
}); });
}); });
}; };
Chats.addParentHandler = function (mainWrapper) { Chats.addParentHandler = function (mainWrapper) {
mainWrapper.on('click', '[component="chat/message/parent"]', function () { mainWrapper.off('click', '[component="chat/message/parent"]')
.on('click', '[component="chat/message/parent"]', function () {
const parentEl = $(this); const parentEl = $(this);
parentEl.find('[component="chat/message/parent/content"]').toggleClass('line-clamp-1'); parentEl.find('[component="chat/message/parent/content"]').toggleClass('line-clamp-1');
parentEl.find('.chat-timestamp').toggleClass('hidden'); parentEl.find('.chat-timestamp').toggleClass('hidden');
@ -206,7 +208,8 @@ define('forum/chats', [
}; };
Chats.addIPHandler = function (container) { Chats.addIPHandler = function (container) {
container.on('click', '.chat-ip-button', async function () { container.off('click', '.chat-ip-button')
.on('click', '.chat-ip-button', async function () {
const ipEl = $(this); const ipEl = $(this);
let ip = ipEl.attr('data-ip'); let ip = ipEl.attr('data-ip');
if (ip) { if (ip) {

Loading…
Cancel
Save