From a7a9f3eb92b81b9791fbcc546022dec4e1b75e62 Mon Sep 17 00:00:00 2001 From: Priyank Patel Date: Mon, 31 May 2021 17:23:29 +0000 Subject: [PATCH] subs: Use e.key instead of deprecated e.which. Tested by making sure the "Filter stream" search box filters stream on user input (when Enter is not pressed) in the Streams modal. --- static/js/subs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/subs.js b/static/js/subs.js index 5365ee271a..41e41cc44d 100644 --- a/static/js/subs.js +++ b/static/js/subs.js @@ -639,7 +639,7 @@ export function setup_page(callback) { // streams, either explicitly via user_can_create_streams, or // implicitly because page_params.realm_is_zephyr_mirror_realm. $("#stream_filter input[type='text']").on("keypress", (e) => { - if (e.which !== 13) { + if (e.key !== "Enter") { return; }