enable chat in next tick to avoid t being entered

This commit is contained in:
Romain Beaumont 2021-03-16 20:55:28 +00:00
parent 7c9b954d35
commit ceca3bfcfa

View file

@ -133,11 +133,11 @@ class ChatBox extends LitElement {
e = e || window.event
if (self.inChat === false) {
if (e.code === 'KeyT') {
enableChat(false)
setTimeout(() => enableChat(false), 0)
}
if (e.code === 'Slash') {
enableChat(true)
setTimeout(() => enableChat(true), 0)
}
return false
}