Compare commits

...

2 Commits

Author SHA1 Message Date
Sivasish Praharaj
bd56b62976
Merge b9e351215a7800fedd8985fdf413548dacf990ee into 8c975a4f0d22ef8828142729febce4696301a81a 2025-06-27 17:42:12 +07:00
Sivasish Praharaj
b9e351215a Sivasish48: Issue #39287 Replacing the "show" method with a modified version and Introduced a small delay before triggering the 'Offcanvas'
Modifying the 'show' method with 'Offcanvas' class and creating a small delay wuth 'setTimeOut' before triggering the Offcanvas.
2024-01-22 11:15:37 +05:30

View File

@ -102,8 +102,12 @@ class Offcanvas extends BaseComponent {
}
this._isShown = true
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