web: Avoid slow jQuery :input, :checkbox, :radio selectors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-05-01 21:48:01 -07:00
committed by Tim Abbott
parent 7aa1763d73
commit ff2a7b775a
3 changed files with 4 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ function update_announce_stream_state() {
const $announce_stream_checkbox = $("#announce-new-stream input");
const $announce_stream_label = $("#announce-new-stream");
let disable_it = false;
const privacy_type = $("#stream_creation_form input:radio[name=privacy]:checked").val();
const privacy_type = $("#stream_creation_form input[type=radio][name=privacy]:checked").val();
const is_invite_only =
privacy_type === "invite-only" || privacy_type === "invite-only-public-history";
$announce_stream_label.removeClass("control-label-disabled");