mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +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()
|
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