From 90bd3e9123c0424ecd8ebc99c32af0299d1eb3c3 Mon Sep 17 00:00:00 2001 From: Priyank Patel Date: Mon, 31 May 2021 17:18:26 +0000 Subject: [PATCH] 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. --- static/js/stream_popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js index ce52409c77..2df5c6d433 100644 --- a/static/js/stream_popover.js +++ b/static/js/stream_popover.js @@ -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(