Skip to content

Commit

Permalink
Merge pull request #5990 from mamhoff/fix-builds
Browse files Browse the repository at this point in the history
Fix(v4.1): Collapse admin nav on small windows
  • Loading branch information
tvdeyen authored Dec 3, 2024
2 parents ed79fd3 + d68301c commit 8dacd47
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Spree.ready(function() {
if (window.screen.width <= 1024 && !document.cookie.includes("admin_nav_hidden")) {
if (window.width <= 1024 && !document.cookie.includes("admin_nav_hidden")) {
// Set default nav to collapse on small screens - but don't override user preference
document.body.classList.add("admin-nav-hidden");
document.cookie = "admin_nav_hidden=true; expires=Fri, 31 Dec 9999 23:59:59 GMT";
Expand Down

0 comments on commit 8dacd47

Please sign in to comment.