Fix emoji bar in chat (#76)

This commit is contained in:
Võ Trung Hoàng Hưng 2023-08-15 00:39:41 +07:00 committed by GitHub
parent 68e705404e
commit 807ba554ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -508,9 +508,15 @@
} }
$('#emoji-button').on('click', function(e) { $('#emoji-button').on('click', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation();
toggleEmoji(); 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) { $('emoji-picker').on('emoji-click', function(e) {
var $chat = $('#chat-input').get(0); var $chat = $('#chat-input').get(0);
insert_char_after_cursor($chat, e.detail.unicode); insert_char_after_cursor($chat, e.detail.unicode);