Fix sidebar dropdown direction and accidental mobile drawer opening
- CSS: When sidebar is collapsed, open user-menu dropdown to the right (left: 0, right: auto) via data-sidebar-expanded="false" selector. - JS: Guard drawerToggle change handler – prevent mobile drawer from opening on desktop viewports (window.innerWidth >= 1024). - HTML: Add phx-update="ignore" to mobile-drawer checkbox to prevent LiveView from resetting its checked state on DOM patches.
This commit is contained in:
parent
97fcae3e9d
commit
c637b6b84f
3 changed files with 20 additions and 1 deletions
|
|
@ -357,4 +357,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Collapsed Sidebar: User Menu Dropdown Richtung
|
||||
============================================ */
|
||||
|
||||
/* Bei eingeklappter Sidebar liegt der Avatar-Button am linken Rand.
|
||||
dropdown-end würde das Menü nach links öffnen (off-screen).
|
||||
Stattdessen nach rechts öffnen (in den Content-Bereich). */
|
||||
#app-layout[data-sidebar-expanded="false"] .dropdown.dropdown-top > ul.dropdown-content {
|
||||
right: auto !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
|
||||
/* This file is for your main application CSS */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue