0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-13 13:29:25 +01:00

Merge b9e351215a7800fedd8985fdf413548dacf990ee into 90acd33350e1356194a364595cb07b65f24bd611

This commit is contained in:
Sivasish Praharaj 2025-02-27 11:55:59 +01:00 committed by GitHub
commit eb3bf2bf48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,7 +102,11 @@ class Offcanvas extends BaseComponent {
}
this._isShown = true
this._backdrop.show()
this._element.classList.add("offcanvas-end") // Adding the class 'offcanvas-end' here
const showOffcanvas = ()=>{
this._backdrop.show()
if (!this._config.scroll) {
new ScrollBarHelper().hide()
@ -123,8 +127,12 @@ class Offcanvas extends BaseComponent {
}
this._queueCallback(completeCallBack, this._element, true)
}
// calling a setTimeout to introduce a small delay triggering Offcanvas
setTimeout(showOffcanvas,50) // Adjust the delay as needed
}
hide() {
if (!this._isShown) {
return