Merge pull request #2785 from williamboman/fix-closing-sidebar
fix automatically closing sidebar on some mobile viewports
This commit is contained in:
commit
67a28d1e94
@ -37,7 +37,7 @@ $(function() {
|
||||
$("#sidebar-overlay").on("click", () => {
|
||||
slideoutMenu.toggle(false);
|
||||
|
||||
if ($(window).outerWidth() >= utils.mobileViewportPixels) {
|
||||
if ($(window).outerWidth() > utils.mobileViewportPixels) {
|
||||
storeSidebarVisibility("thelounge.state.sidebar", false);
|
||||
}
|
||||
});
|
||||
@ -47,7 +47,7 @@ $(function() {
|
||||
|
||||
slideoutMenu.toggle(isOpen);
|
||||
|
||||
if ($(window).outerWidth() >= utils.mobileViewportPixels) {
|
||||
if ($(window).outerWidth() > utils.mobileViewportPixels) {
|
||||
storeSidebarVisibility("thelounge.state.sidebar", isOpen);
|
||||
}
|
||||
});
|
||||
@ -192,7 +192,7 @@ $(function() {
|
||||
utils.toggleNotificationMarkers(false);
|
||||
}
|
||||
|
||||
if (!keepSidebarOpen && $(window).outerWidth() < utils.mobileViewportPixels) {
|
||||
if (!keepSidebarOpen && $(window).outerWidth() <= utils.mobileViewportPixels) {
|
||||
slideoutMenu.toggle(false);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ socket.on("init", function(data) {
|
||||
const viewportWidth = $(window).outerWidth();
|
||||
let isUserlistOpen = storage.get("thelounge.state.userlist");
|
||||
|
||||
if (viewportWidth >= utils.mobileViewportPixels) {
|
||||
if (viewportWidth > utils.mobileViewportPixels) {
|
||||
slideoutMenu.toggle(storage.get("thelounge.state.sidebar") !== "false");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user