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

Tested by making sure Enter works as expected in Stream membership
input in Stream setttings.
This commit is contained in:
Priyank Patel
2021-05-31 17:16:18 +00:00
committed by Tim Abbott
parent 7f87ea7e79
commit f2aae91cc1
2 changed files with 2 additions and 2 deletions

View File

@@ -301,7 +301,7 @@ test_ui("subscriber_pills", (override) => {
"keyup", "keyup",
".subscriber_list_add form", ".subscriber_list_add form",
); );
event.which = 13; event.key = "Enter";
// Only Denmark stream pill is created and a // Only Denmark stream pill is created and a
// request is sent to add all it's subscribers. // request is sent to add all it's subscribers.

View File

@@ -808,7 +808,7 @@ export function initialize() {
); );
$("#subscriptions_table").on("keyup", ".subscriber_list_add form", (e) => { $("#subscriptions_table").on("keyup", ".subscriber_list_add form", (e) => {
if (e.which === 13) { if (e.key === "Enter") {
e.preventDefault(); e.preventDefault();
submit_add_subscriber_form(e); submit_add_subscriber_form(e);
} }