mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Help offcanvas follow Css responsiveness
This commit is contained in:
@@ -185,6 +185,14 @@ class Offcanvas extends BaseComponent {
|
|||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
EventHandler.on(window, 'resize', () => {
|
||||||
|
// Add this check to help js be aligned with css changes on responsive offcanvas
|
||||||
|
if (this._isShown && getComputedStyle(this._element).position !== 'fixed') {
|
||||||
|
// this._backdrop.hide()
|
||||||
|
this.hide()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
|
|||||||
Reference in New Issue
Block a user