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.
This commit is contained in:
Priyank Patel 2021-05-31 17:23:29 +00:00 committed by Tim Abbott
parent 90bd3e9123
commit a7a9f3eb92
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}