Skip to content

Commit 046a16a

Browse files
committed
fix(sidebar): rtl ps scrollbar issue temp fix/refactor
1 parent 397a812 commit 046a16a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

js/src/sidebar.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ const Sidebar = (($) => {
106106
this.destroyScrollbar()
107107
} else {
108108
this.ps = this.makeScrollbar()
109-
// ToDo: find real fix for ps rtl
110-
this.ps.isRtl = false
111109
}
112110
}
113111

@@ -116,17 +114,18 @@ const Sidebar = (($) => {
116114
setTimeout(() => {
117115
this.destroyScrollbar()
118116
this.ps = this.makeScrollbar()
119-
// ToDo: find real fix for ps rtl
120-
this.ps.isRtl = false
121117
}, Default.transition)
122118
}
123119
}
124120
}
125121

126122
makeScrollbar(container = Selector.NAVIGATION_CONTAINER) {
127-
return new PerfectScrollbar(document.querySelector(container), {
123+
const ps = new PerfectScrollbar(document.querySelector(container), {
128124
suppressScrollX: true
129125
})
126+
// ToDo: find real fix for ps rtl
127+
ps.isRtl = false
128+
return ps
130129
}
131130

132131
destroyScrollbar() {

0 commit comments

Comments
 (0)