Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
invite_user_modal: Always show scrollbar.
tnmkr536f2e09e242
diff --git a/web/src/dialog_widget.ts b/web/src/dialog_widget.tsindex eef2ee9bb60..89777a0f4c2 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.tsindex 9b8bb8b2b80..e62c4ead23c 100644--- a/web/src/invite.ts+++ b/web/src/invite.ts@@ -494,6 +494,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent<Document, undefined>): voidloading_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.hbsindex e805a556008..063df4d9d83 100644--- a/web/templates/dialog_widget.hbs+++ b/web/templates/dialog_widget.hbs@@ -10,7 +10,7 @@</h1><button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button></header>- <main class="modal__content" data-simplebar>+ <main class="modal__content" data-simplebar {{#if always_visible_scrollbar}}data-simplebar-auto-hide="false"{{/if}}><div class="alert" id="dialog_error"></div>{{{ html_body }}}</main>