stream_popover: Use e.key instead of deprecated e.which.

Tested by making sure that Enter and other keys work as expected in
the streams dropdown in the Move topic modal.
This commit is contained in:
Priyank Patel 2021-05-31 17:18:26 +00:00 committed by Tim Abbott
parent f2aae91cc1
commit 90bd3e9123
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ export function register_click_handlers() {
// and thus don't want to kill the natural bubbling of event.
e.preventDefault();
if (e.type === "keypress" && e.which !== 13) {
if (e.type === "keypress" && e.key !== "Enter") {
return;
}
const stream_name = stream_data.maybe_get_stream_name(