forked from forktown/watch-party
don't add emoji on rightclick
This commit is contained in:
parent
35329a9fbd
commit
a5e04340dd
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ const setupChatboxEvents = (socket) => {
|
||||||
const button = Object.assign(document.createElement("button"), {
|
const button = Object.assign(document.createElement("button"), {
|
||||||
className: "emoji-option" + (i === 0 ? " selected" : ""),
|
className: "emoji-option" + (i === 0 ? " selected" : ""),
|
||||||
onmousedown: (e) => e.preventDefault(),
|
onmousedown: (e) => e.preventDefault(),
|
||||||
onmouseup: () =>
|
onclick: () =>
|
||||||
insertAtCursor(button, name.slice(match[2].length) + ": "),
|
insertAtCursor(button, name.slice(match[2].length) + ": "),
|
||||||
onmouseover: () => select(button),
|
onmouseover: () => select(button),
|
||||||
onfocus: () => select(button),
|
onfocus: () => select(button),
|
||||||
|
@ -100,7 +100,7 @@ const setupChatboxEvents = (socket) => {
|
||||||
let selected = document.querySelector(".emoji-option.selected");
|
let selected = document.querySelector(".emoji-option.selected");
|
||||||
if (!selected) return;
|
if (!selected) return;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
selected.onmouseup();
|
selected.onclick();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue