diff --git a/web/src/dialog_widget.ts b/web/src/dialog_widget.ts index eef2ee9bb6..89777a0f4c 100644 --- a/web/src/dialog_widget.ts +++ b/web/src/dialog_widget.ts @@ -63,6 +63,7 @@ export type DialogWidgetConfig = { post_render?: () => void; loading_spinner?: boolean; update_submit_disabled_state_on_change?: boolean; + always_visible_scrollbar?: boolean; }; type RequestOpts = { @@ -130,6 +131,9 @@ export function launch(conf: DialogWidgetConfig): void { // submit button when clicked. // * update_submit_disabled_state_on_change: If true, updates state of submit button // on valid input change in modal. + // * always_visible_scrollbar: Whether the scrollbar is always visible if modal body + // has scrollable content. Default behaviour is to hide the scrollbar when it is + // not in use. const html_submit_button = conf.html_submit_button ?? $t_html({defaultMessage: "Save changes"}); const html_exit_button = conf.html_exit_button ?? $t_html({defaultMessage: "Cancel"}); @@ -141,6 +145,7 @@ export function launch(conf: DialogWidgetConfig): void { html_body: conf.html_body, id: conf.id, single_footer_button: conf.single_footer_button, + always_visible_scrollbar: conf.always_visible_scrollbar, }); const $dialog = $(html); $("body").append($dialog); diff --git a/web/src/invite.ts b/web/src/invite.ts index 9b8bb8b2b8..e62c4ead23 100644 --- a/web/src/invite.ts +++ b/web/src/invite.ts @@ -494,6 +494,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent): void loading_spinner: true, on_click: invite_users, post_render: invite_user_modal_post_render, + always_visible_scrollbar: true, }); } diff --git a/web/templates/dialog_widget.hbs b/web/templates/dialog_widget.hbs index e805a55600..063df4d9d8 100644 --- a/web/templates/dialog_widget.hbs +++ b/web/templates/dialog_widget.hbs @@ -10,7 +10,7 @@ -
+
{{{ html_body }}}