From 914ed51d70c38b67a0ca503f086eb5c73666e921 Mon Sep 17 00:00:00 2001 From: Daniil Fadeev Date: Mon, 1 May 2023 16:05:50 +0700 Subject: [PATCH] compose: Fix buttons in error banners is not clickable. --- web/src/compose_banner.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/compose_banner.ts b/web/src/compose_banner.ts index 4bea736f47..a2b5ac0298 100644 --- a/web/src/compose_banner.ts +++ b/web/src/compose_banner.ts @@ -51,7 +51,9 @@ export const CLASSNAMES = { user_not_subscribed: "user_not_subscribed", }; -export function append_compose_banner_to_banner_list(new_row: HTMLElement): void { +export function append_compose_banner_to_banner_list( + new_row: HTMLElement | JQuery.htmlString, +): void { scroll_util.get_content_element($("#compose_banners")).append(new_row); } @@ -99,8 +101,7 @@ export function show_error_message(message: string, classname: string, $bad_inpu button_text: null, classname, }); - const $compose_banner_area = $("#compose_banners"); - $compose_banner_area.append(new_row); + append_compose_banner_to_banner_list(new_row); hide_compose_spinner(); @@ -118,8 +119,7 @@ export function show_stream_does_not_exist_error(stream_name: string): void { stream_name, classname: CLASSNAMES.stream_does_not_exist, }); - const $compose_banner_area = $("#compose_banners"); - $compose_banner_area.append(new_row); + append_compose_banner_to_banner_list(new_row); hide_compose_spinner(); // A copy of `compose_recipient.open_compose_stream_dropup()` that