js: Fix no-jquery/no-event-shorthand.

The event shorthand methods were deprecated in jQuery 3.3.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-03-16 14:19:20 -07:00 committed by Tim Abbott
parent 5d77381667
commit da0658967c
4 changed files with 4 additions and 4 deletions

View File

@ -128,7 +128,7 @@ async function test_navigations_from_home(page: Page): Promise<void> {
await page.evaluate(() =>
$(
'*[title="Narrow to your private messages with Cordelia, Lear\'s daughter, King Hamlet"]',
).click(),
).trigger("click"),
);
await un_narrow_by_clicking_org_icon(page);
await expect_recent_topics(page);

View File

@ -133,7 +133,7 @@ function submit_invitation_form() {
complete() {
$("#submit-invitation").text($t({defaultMessage: "Invite"}));
$("#submit-invitation").prop("disabled", false);
$("#invitee_emails").focus();
$("#invitee_emails").trigger("focus");
ui.get_scroll_element($("#invite_user_form .modal-body"))[0].scrollTop = 0;
},
});

View File

@ -47,7 +47,7 @@ export function create_handlers($container) {
$container.on("click", ".add_all_users_to_stream", (e) => {
e.preventDefault();
add_all_users();
$(".add-user-list-filter").focus();
$(".add-user-list-filter").trigger("focus");
});
$container.on("click", ".remove_potential_subscriber", (e) => {

View File

@ -209,7 +209,7 @@ export function activate(opts) {
// so we need to just toggle the checkbox back to its
// previous state.
$(e.target).prop("checked", !$(e.target).is(":checked"));
$(e.target).blur();
$(e.target).trigger("blur");
return;
}
const key = $(e.target).attr("data-key");