mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
Feat: add resize handler to Offcanvas.js.
If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior The `aria-modal` addon is to protect us, selection backdrop elements
This commit is contained in:
@@ -206,14 +206,6 @@ 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