File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed
Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ const Sidebar = (($) => {
5959 NAVIGATION : '.sidebar-nav > .nav' ,
6060 SIDEBAR : '.sidebar' ,
6161 SIDEBAR_MINIMIZER : '.sidebar-minimizer' ,
62- SIDEBAR_TOGGLER : '.sidebar-toggler'
62+ SIDEBAR_TOGGLER : '.sidebar-toggler' ,
63+ SIDEBAR_SCROLL : '.sidebar-scroll'
6364 }
6465
6566 const ShowClassNames = [
@@ -127,7 +128,17 @@ const Sidebar = (($) => {
127128 }
128129 }
129130
130- makeScrollbar ( container = Selector . NAVIGATION_CONTAINER ) {
131+ makeScrollbar ( ) {
132+ let container = Selector . SIDEBAR_SCROLL ;
133+
134+ if ( document . querySelector ( container ) === null ) {
135+ container = Selector . NAVIGATION_CONTAINER ;
136+
137+ if ( document . querySelector ( container ) === null ) {
138+ return null ;
139+ }
140+ }
141+
131142 const ps = new PerfectScrollbar ( document . querySelector ( container ) , {
132143 suppressScrollX : true
133144 } )
Original file line number Diff line number Diff line change 4545 }
4646 }
4747
48- .sidebar-nav {
48+ .sidebar-scroll {
4949 position : relative ;
5050 flex : 1 ;
5151 overflow-x : hidden ;
5252 overflow-y : auto ;
5353 @include sidebar-width ($sidebar-borders , $sidebar-width );
5454 }
5555
56+ .sidebar-nav {
57+ position : relative ;
58+ flex : 1 ;
59+ @include sidebar-width ($sidebar-borders , $sidebar-width );
60+ }
61+
62+ > .sidebar-nav {
63+ overflow-x : hidden ;
64+ overflow-y : auto ;
65+ }
66+
5667 .nav {
5768 @include sidebar-width ($sidebar-borders , $sidebar-width );
5869 flex-direction : column ;
365376 .sidebar {
366377 z-index : $zindex-sticky - 1 ;
367378
379+ .sidebar-scroll {
380+ overflow : visible ;
381+ @include sidebar-width ($sidebar-borders , $sidebar-minimized-width );
382+ }
383+
368384 .sidebar-nav {
369385 overflow : visible ;
370386 @include sidebar-width ($sidebar-borders , $sidebar-minimized-width );
You can’t perform that action at this time.
0 commit comments