From a5e04340dd61520fe73d602cca2bd0d2d30663d9 Mon Sep 17 00:00:00 2001 From: easrng Date: Wed, 16 Feb 2022 08:22:11 -0500 Subject: [PATCH] don't add emoji on rightclick --- frontend/lib/chat.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/lib/chat.mjs b/frontend/lib/chat.mjs index 6108b2f..404c11c 100644 --- a/frontend/lib/chat.mjs +++ b/frontend/lib/chat.mjs @@ -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(); } });