diff --git a/templates/chat/chat.html b/templates/chat/chat.html index beb38b4..37d1d04 100644 --- a/templates/chat/chat.html +++ b/templates/chat/chat.html @@ -508,9 +508,15 @@ } $('#emoji-button').on('click', function(e) { e.preventDefault(); + e.stopPropagation(); toggleEmoji(); }); + // Đóng bảng emoji khi click bất kỳ chỗ nào trên màn hình + document.addEventListener("click", function() { + tooltip.classList.remove('shown'); // Ẩn bảng emoji + }); + $('emoji-picker').on('emoji-click', function(e) { var $chat = $('#chat-input').get(0); insert_char_after_cursor($chat, e.detail.unicode);