Chat: Use `KeyboardEvent.key` instead of deprecated `.which`
parent
faf84f0143
commit
cf86ae8b63
|
@ -238,7 +238,7 @@ exports.chat = (() => {
|
||||||
|
|
||||||
$('#chatinput').keypress((evt) => {
|
$('#chatinput').keypress((evt) => {
|
||||||
// if the user typed enter, fire the send
|
// if the user typed enter, fire the send
|
||||||
if (evt.which === 13 || evt.which === 10) {
|
if (evt.key === 'Enter') {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
this.send();
|
this.send();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue