2
0
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:
GeoSot
2022-04-06 02:39:54 +03:00
committed by Mark Otto
parent 9b7759ff37
commit 1821f699b1
-8
View File
@@ -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