This commit is contained in:
Sivasish Praharaj 2025-05-02 08:45:34 +00:00 committed by GitHub
commit bc6cb01ca7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

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