Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
overlays: Rename "modal-body" class.
Sahil Batrab3d9f5a4193c
diff --git a/web/src/info_overlay.js b/web/src/info_overlay.jsindex 75fc3c60e34..c4e255c8675 100644--- a/web/src/info_overlay.js+++ b/web/src/info_overlay.js@@ -266,7 +266,7 @@ export function set_up_toggler() {$(".overlay-modal").hide();$(`#${CSS.escape(key)}`).show();scroll_util- .get_scroll_element($(`#${CSS.escape(key)}`).find(".modal-body"))+ .get_scroll_element($(`#${CSS.escape(key)}`).find(".overlay-scroll-container")).trigger("focus");},};@@ -277,7 +277,7 @@ export function set_up_toggler() {const modals = opts.values.map((item) => {const key = item.key; // e.g. message-formatting- const $modal = $(`#${CSS.escape(key)}`).find(".modal-body");+ const $modal = $(`#${CSS.escape(key)}`).find(".overlay-scroll-container");return $modal;});diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex ae010314295..b51f6ce9a62 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -270,7 +270,7 @@ export function initialize_kitchen_sink_stuff() {// propagation in all cases. Also, ignore the event if the// element is already at the top or bottom. Otherwise we get a// new scroll event on the parent (?).- $(".modal-body, .scrolling_list, input, textarea").on("wheel", function (e) {+ $(".overlay-scroll-container, .scrolling_list, input, textarea").on("wheel", function (e) {const $self = scroll_util.get_scroll_element($(this));const scroll = $self.scrollTop();const delta = e.originalEvent.deltaY;diff --git a/web/styles/app_components.css b/web/styles/app_components.cssindex c4fd042cf14..ab71c737db5 100644--- a/web/styles/app_components.css+++ b/web/styles/app_components.css@@ -388,6 +388,11 @@ div.overlay {transition-timing-function: ease-out;}}++ .overlay-scroll-container {+ max-height: 60vh;+ padding: 15px;+ }}.input-append {diff --git a/web/styles/informational_overlays.css b/web/styles/informational_overlays.cssindex eaf3fad1b6e..c471a89a2e4 100644--- a/web/styles/informational_overlays.css+++ b/web/styles/informational_overlays.css@@ -33,7 +33,7 @@.overlay-modal {padding-bottom: 10px;- .modal-body {+ .overlay-scroll-container {height: 70vh;text-align: center;outline: none;diff --git a/web/styles/modal.css b/web/styles/modal.cssindex 761747ec2e8..ef2689fbef7 100644--- a/web/styles/modal.css+++ b/web/styles/modal.css@@ -1,8 +1,3 @@-.modal-body {- max-height: 60vh;- padding: 15px;-}-.modal-bg {background-color: var(--color-background-modal);}diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex dda2239d880..28459fd2c06 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -3022,6 +3022,11 @@ select.invite-as {.fa-copy:hover {color: hsl(170deg 48% 54%);}++ .overlay-body {+ max-height: 60vh;+ padding: 15px;+ }}@media (width < $xl_min) {diff --git a/web/templates/about_zulip.hbs b/web/templates/about_zulip.hbsindex aa70e18bb7e..55820fd16b4 100644--- a/web/templates/about_zulip.hbs+++ b/web/templates/about_zulip.hbs@@ -1,7 +1,7 @@<div id="about-zulip" class="overlay flex new-style" tabindex="-1" role="dialog" data-overlay="about-zulip" aria-hidden="true"><div class="overlay-content modal-bg"><button type="button" class="exit" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>- <div class="modal-body">+ <div class="overlay-body"><div class="about-zulip-logo"><a target="_blank" rel="noopener noreferrer" href="https://zulip.com"><img src="../../static/images/logo/zulip-org-logo.svg" alt="{{t 'Zulip' }}" /></a></div>diff --git a/web/templates/keyboard_shortcuts.hbs b/web/templates/keyboard_shortcuts.hbsindex 607a8fb3a18..a40c6290e46 100644--- a/web/templates/keyboard_shortcuts.hbs+++ b/web/templates/keyboard_shortcuts.hbs@@ -1,6 +1,6 @@<div class="overlay-modal" id="keyboard-shortcuts" tabindex="-1" role="dialog"aria-label="{{t 'Keyboard shortcuts' }}">- <div class="modal-body" data-simplebar data-simplebar-auto-hide="false">+ <div class="overlay-scroll-container" data-simplebar data-simplebar-auto-hide="false"><div><table class="hotkeys_table table table-striped table-bordered"><thead>diff --git a/web/templates/markdown_help.hbs b/web/templates/markdown_help.hbsindex 13355f66afe..65677ec5c81 100644--- a/web/templates/markdown_help.hbs+++ b/web/templates/markdown_help.hbs@@ -1,6 +1,6 @@<div class="overlay-modal hide" id="message-formatting" tabindex="-1" role="dialog"aria-label="{{t 'Message formatting' }}">- <div class="modal-body" data-simplebar data-simplebar-auto-hide="false">+ <div class="overlay-scroll-container" data-simplebar data-simplebar-auto-hide="false"><div id="markdown-instructions"><table class="table table-striped table-rounded table-bordered help-table"><thead>diff --git a/web/templates/search_operators.hbs b/web/templates/search_operators.hbsindex 05c6a57d4cf..240cf8bbf86 100644--- a/web/templates/search_operators.hbs+++ b/web/templates/search_operators.hbs@@ -1,5 +1,5 @@<div class="overlay-modal hide" id="search-operators" tabindex="-1" role="dialog" aria-label="{{t 'Search filters' }}">- <div class="modal-body" data-simplebar data-simplebar-auto-hide="false">+ <div class="overlay-scroll-container" data-simplebar data-simplebar-auto-hide="false"><div id="operators-instructions"><table class="table table-striped table-rounded table-bordered help-table"><thead>