From 1614335bb005ee1b9df4c6f63725bc505dfb4588 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 10 Jan 2021 16:06:00 -0500 Subject: [PATCH] Fix profile panel not being able to be closed due to hidden sidebar (#1220) --- ext/mixed/css/display.css | 3 ++- ext/mixed/js/display-profile-selection.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css index 06c2a2e0..6bea1ad2 100644 --- a/ext/mixed/css/display.css +++ b/ext/mixed/css/display.css @@ -389,7 +389,8 @@ a { } .content-sidebar[hidden][data-has-navigation-previous=true], .content-sidebar[hidden][data-has-navigation-next=true], -:root[data-popup-action-bar-visibility=always] .content-sidebar { +:root[data-popup-action-bar-visibility=always] .content-sidebar, +:root[data-profile-panel-visible=true] .content-sidebar { display: block; } .content-sidebar-inner { diff --git a/ext/mixed/js/display-profile-selection.js b/ext/mixed/js/display-profile-selection.js index 357a2a85..0a44392e 100644 --- a/ext/mixed/js/display-profile-selection.js +++ b/ext/mixed/js/display-profile-selection.js @@ -59,6 +59,7 @@ class DisplayProfileSelection { _setProfilePanelVisible(visible) { this._profilePanel.setVisible(visible); this._profileButton.classList.toggle('sidebar-button-highlight', visible); + document.documentElement.dataset.profilePanelVisible = `${visible}`; if (visible && this._profileListNeedsUpdate) { this._updateProfileList(); }