don't add emoji on rightclick

This commit is contained in:
easrng 2022-02-16 08:22:11 -05:00
parent 35329a9fbd
commit a5e04340dd

View file

@ -58,7 +58,7 @@ const setupChatboxEvents = (socket) => {
const button = Object.assign(document.createElement("button"), {
className: "emoji-option" + (i === 0 ? " selected" : ""),
onmousedown: (e) => e.preventDefault(),
onmouseup: () =>
onclick: () =>
insertAtCursor(button, name.slice(match[2].length) + ": "),
onmouseover: () => select(button),
onfocus: () => select(button),
@ -100,7 +100,7 @@ const setupChatboxEvents = (socket) => {
let selected = document.querySelector(".emoji-option.selected");
if (!selected) return;
event.preventDefault();
selected.onmouseup();
selected.onclick();
}
});