stream_create: Use e.key instead of deprecated e.keyCode.

Tested by making sure pressing Enter in the stream creation
description did not create a new line.
This commit is contained in:
Priyank Patel 2021-05-29 20:16:37 +00:00 committed by Tim Abbott
parent 121e21d3b9
commit 63cf47b63a
1 changed files with 1 additions and 1 deletions

View File

@ -483,7 +483,7 @@ export function set_up_handlers() {
// Do not allow the user to enter newline characters while typing out the
// stream's description during it's creation.
container.on("keydown", "#create_stream_description", (e) => {
if ((e.keyCode || e.which) === 13) {
if (e.key === "Enter") {
e.preventDefault();
}
});