From 3f4e4b00f9a848f93b36967f29b8f5bb7f80ab29 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 02:50:30 +0000 Subject: [PATCH] Fix profile modal stacking by hiding sidebar when active Adds `modal-open` class to `body` and `documentElement` when the profile modal opens, and removes it when it closes. This activates the existing CSS rule that hides the sidebar and lowers its z-index, resolving the issue where the sidebar appeared on top of the modal on desktop. --- js/ui/profileModalController.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/ui/profileModalController.js b/js/ui/profileModalController.js index e5a78276..c296254a 100644 --- a/js/ui/profileModalController.js +++ b/js/ui/profileModalController.js @@ -12363,6 +12363,12 @@ export class ProfileModalController { modalRoot.classList.remove("hidden"); modalRoot.setAttribute("aria-hidden", "false"); + if (document.body) { + document.body.classList.add("modal-open"); + } + if (document.documentElement) { + document.documentElement.classList.add("modal-open"); + } this.setGlobalModalState("profile", true); const preserveMenu = this.isMobileLayoutActive(); this.selectPane(pane, { keepMenuView: preserveMenu }); @@ -12396,6 +12402,12 @@ export class ProfileModalController { modalElement.setAttribute("aria-hidden", "true"); delete modalElement.dataset.nestedModalActive; delete modalElement.dataset.modalStack; + if (document.body) { + document.body.classList.remove("modal-open"); + } + if (document.documentElement) { + document.documentElement.classList.remove("modal-open"); + } this.setGlobalModalState("profile", false); this.setMobileView("menu", { skipFocusTrap: true });