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 = (($) => {
59
59
NAVIGATION : '.sidebar-nav > .nav' ,
60
60
SIDEBAR : '.sidebar' ,
61
61
SIDEBAR_MINIMIZER : '.sidebar-minimizer' ,
62
- SIDEBAR_TOGGLER : '.sidebar-toggler'
62
+ SIDEBAR_TOGGLER : '.sidebar-toggler' ,
63
+ SIDEBAR_SCROLL : '.sidebar-scroll'
63
64
}
64
65
65
66
const ShowClassNames = [
@@ -127,7 +128,17 @@ const Sidebar = (($) => {
127
128
}
128
129
}
129
130
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
+
131
142
const ps = new PerfectScrollbar ( document . querySelector ( container ) , {
132
143
suppressScrollX : true
133
144
} )
Original file line number Diff line number Diff line change 45
45
}
46
46
}
47
47
48
- .sidebar-nav {
48
+ .sidebar-scroll {
49
49
position : relative ;
50
50
flex : 1 ;
51
51
overflow-x : hidden ;
52
52
overflow-y : auto ;
53
53
@include sidebar-width ($sidebar-borders , $sidebar-width );
54
54
}
55
55
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
+
56
67
.nav {
57
68
@include sidebar-width ($sidebar-borders , $sidebar-width );
58
69
flex-direction : column ;
365
376
.sidebar {
366
377
z-index : $zindex-sticky - 1 ;
367
378
379
+ .sidebar-scroll {
380
+ overflow : visible ;
381
+ @include sidebar-width ($sidebar-borders , $sidebar-minimized-width );
382
+ }
383
+
368
384
.sidebar-nav {
369
385
overflow : visible ;
370
386
@include sidebar-width ($sidebar-borders , $sidebar-minimized-width );
You can’t perform that action at this time.
0 commit comments