Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
css: Adjust scope for main overlay CSS and click handlers.
Tim Abbott0dac331c17b7
diff --git a/static/js/overlays.js b/static/js/overlays.jsindex dbb715a5733..ea47e59360a 100644--- a/static/js/overlays.js+++ b/static/js/overlays.js@@ -44,20 +44,20 @@ export function drafts_open() {// To address bugs where mouse might apply to the streams/settings// overlays underneath an open modal within those settings UI, we add-// this inline style to '.overlay.show', overriding the+// this inline style to 'div.overlay.show', overriding the// "pointer-events: all" style in app_components.css.//// This is kinda hacky; it only works for modals within overlays, and// we need to make sure it gets re-enabled when the modal closes.export function disable_background_mouse_events() {- $(".overlay.show").attr("style", "pointer-events: none");+ $("div.overlay.show").attr("style", "pointer-events: none");}// This removes only the inline-style of the element that// was added in disable_background_mouse_events and// enables the background mouse events.export function enable_background_mouse_events() {- $(".overlay.show").attr("style", null);+ $("div.overlay.show").attr("style", null);}export function active_modal() {@@ -211,7 +211,7 @@ export function close_active_modal() {}export function close_for_hash_change() {- $(".overlay.show").removeClass("show");+ $("div.overlay.show").removeClass("show");if (active_overlay) {close_handler();}@@ -228,14 +228,14 @@ export function open_settings() {}export function initialize() {- $("body").on("click", ".overlay, .overlay .exit", (e) => {+ $("body").on("click", "div.overlay, div.overlay .exit", (e) => {let $target = $(e.target);- // if the target is not the .overlay element, search up the node tree+ // if the target is not the div.overlay element, search up the node tree// until it is found.if ($target.is(".exit, .exit-sign, .overlay-content, .exit span")) {$target = $target.closest("[data-overlay]");- } else if (!$target.is(".overlay")) {+ } else if (!$target.is("div.overlay")) {// not a valid click target then.return;}diff --git a/static/styles/app_components.css b/static/styles/app_components.cssindex 4301942826c..8e41f0fb624 100644--- a/static/styles/app_components.css+++ b/static/styles/app_components.css@@ -271,7 +271,7 @@}/* -- unified overlay design component -- */-.overlay {+div.overlay {position: fixed;top: 0;left: 0;diff --git a/static/styles/night_mode.css b/static/styles/night_mode.cssindex 7684dc75dcd..485a28edc1a 100644--- a/static/styles/night_mode.css+++ b/static/styles/night_mode.css@@ -272,7 +272,7 @@ on a dark background, and don't change the dark labels dark either. */color: hsla(0, 0%, 90%, 1);}- .overlay,+ div.overlay,#subscription_overlay#stream-creation#stream_creation_form@@ -283,7 +283,7 @@ on a dark background, and don't change the dark labels dark either. */background-color: hsla(212, 28%, 8%, 0.75);}- .overlay .flex.overlay-content > div,+ div.overlay .flex.overlay-content > div,.dropdown-menu.typeahead,#settings_page,.informational-overlays .overlay-content {