Disable scrolling through sidebar overlay
This commit is contained in:
parent
1e8c0547ec
commit
5bb0b198e6
@ -2285,8 +2285,8 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
display: none;
|
||||
transition: opacity 160ms;
|
||||
z-index: 1;
|
||||
}
|
||||
@ -2310,6 +2310,11 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
|
||||
box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#viewport.menu-open #sidebar-overlay,
|
||||
#viewport.menu-dragging #sidebar-overlay {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#viewport.menu-open .messages {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@ -40,13 +40,17 @@ $(function() {
|
||||
storage.set(name, state);
|
||||
}
|
||||
|
||||
$("#windows").on("click", function(e) {
|
||||
const isOpen = slideoutMenu.isOpen();
|
||||
// If sidebar overlay is visible and it is clicked, close the sidebar
|
||||
$("#sidebar-overlay").on("click", () => {
|
||||
slideoutMenu.toggle(false);
|
||||
storeSidebarVisibility("thelounge.state.sidebar", false);
|
||||
});
|
||||
|
||||
if ((isOpen && $(window).outerWidth() < utils.mobileViewportPixels) || $(e.target).is(".lt")) {
|
||||
slideoutMenu.toggle(!isOpen);
|
||||
storeSidebarVisibility("thelounge.state.sidebar", !isOpen);
|
||||
}
|
||||
$("#windows").on("click", "button.lt", () => {
|
||||
const isOpen = !slideoutMenu.isOpen();
|
||||
|
||||
slideoutMenu.toggle(isOpen);
|
||||
storeSidebarVisibility("thelounge.state.sidebar", isOpen);
|
||||
});
|
||||
|
||||
viewport.on("click", ".rt", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user