Fix folded sidebar flashing the active submenu as a flyout on reload (#2992)

This commit is contained in:
Paweł Kuna authored and GitHub committed 2026-09-08 00:44:30 +02:00
1 parent ca252b8611
commit b8e61dbea7
2 files changed
+15

No files matched your search

+5
View File
@@ -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.
+10
View File
@@ -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) {