mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Help offcanvas follow Css responsiveness
This commit is contained in:
@@ -185,6 +185,14 @@ class Offcanvas extends BaseComponent {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user