diff --git a/static/js/stream_create.js b/static/js/stream_create.js index dca92e666a..58b9b4f8f8 100644 --- a/static/js/stream_create.js +++ b/static/js/stream_create.js @@ -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(); } });