mirror of
https://github.com/twbs/bootstrap.git
synced 2025-11-06 00:04:43 -05:00
Merge b9e351215a7800fedd8985fdf413548dacf990ee into 815af314f34add7b0a3012b703fc95884968a95e
This commit is contained in:
commit
c92a03e5b8
@ -102,7 +102,11 @@ class Offcanvas extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._isShown = true
|
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) {
|
if (!this._config.scroll) {
|
||||||
new ScrollBarHelper().hide()
|
new ScrollBarHelper().hide()
|
||||||
@ -123,8 +127,12 @@ class Offcanvas extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._queueCallback(completeCallBack, this._element, true)
|
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() {
|
hide() {
|
||||||
if (!this._isShown) {
|
if (!this._isShown) {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user