mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Fix folded sidebar flashing the active submenu as a flyout on reload (#2992)
This commit is contained in:
1 parent
ca252b8611
commit
b8e61dbea7
2 files changed
+15
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tabler/core": patch
|
||||
---
|
||||
|
||||
Fixed the folded sidebar flashing the active submenu as a flyout on reload before `tabler.js` closed it.
|
||||
@@ -622,6 +622,16 @@ Navbar vertical
|
||||
// a bare :where()/[…] selector would lose to it and never take effect.
|
||||
html[data-bs-sidebar^='folded'] {
|
||||
--sidebar-width: var(--sidebar-folded-width);
|
||||
|
||||
// The sidebar is rendered for the expanded state, so the active submenu can
|
||||
// arrive open (.show). Folded, it would paint as a flyout until sidebar.ts
|
||||
// closes it on DOMContentLoaded — a flicker on every reload. Menus opened by
|
||||
// the Dropdown plugin carry a popper data attribute (data-tblr-popper from
|
||||
// tabler.js, data-bs-popper from Bootstrap's own js), so only the
|
||||
// server-rendered ones hide.
|
||||
.navbar-vertical .dropdown-menu.show:not([data-bs-popper]):not([data-tblr-popper]) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-vertical:is(.navbar-folded, .navbar-folded-hover) {
|
||||
|
||||
Reference in new issue
Block a user