Skip to content

Commit 9830b9a

Browse files
committed
fix(Sidebar): improve backdrop behavior
1 parent 5f8f772 commit 9830b9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/src/sidebar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Sidebar extends BaseComponent {
211211
_initializeBackDrop() {
212212
return new Backdrop({
213213
className: CLASS_NAME_BACKDROP,
214-
isVisible: this._mobile,
214+
isVisible: this._isMobile(),
215215
isAnimated: true,
216216
rootElement: this._element.parentNode,
217217
clickCallback: () => this.hide()
@@ -294,6 +294,7 @@ class Sidebar extends BaseComponent {
294294
EventHandler.on(window, EVENT_RESIZE, () => {
295295
if (this._isMobile() && this._isVisible()) {
296296
this.hide()
297+
this._backdrop = this._initializeBackDrop()
297298
}
298299
})
299300
}

0 commit comments

Comments
 (0)