Fix chat emoji toggle

This commit is contained in:
cuom1999 2024-05-02 13:49:01 -05:00
parent a63afd6f3c
commit cad679ad90

View file

@ -478,12 +478,13 @@
const button = document.querySelector('#emoji-button'); const button = document.querySelector('#emoji-button');
const tooltip = document.querySelector('.tooltip'); const tooltip = document.querySelector('.tooltip');
Popper.createPopper(button, tooltip, { const popper = Popper.createPopper(button, tooltip, {
placement: isMobile ? 'auto-end' : 'left-end', placement: isMobile ? 'auto-end' : 'left',
}); });
function toggleEmoji() { function toggleEmoji() {
tooltip.classList.toggle('shown') tooltip.classList.toggle('shown');
popper.update();
} }
$('#emoji-button').on('click', function(e) { $('#emoji-button').on('click', function(e) {
e.preventDefault(); e.preventDefault();