mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-21 13:24:08 +03:00
Add responsive offcanvas classes
- Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now. - Adds some JS to the offcanvas component to help with responsiveness Co-Authored-By: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
@@ -206,6 +206,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