Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
I use the Offcanvas to show navigation items. Clicking on a navigation item calls hide()
and starts a navigation (Angular client-side routing). Now, when the navigation leads to a page that does not have the offcanvas in it, the dispose()
is called, too. This happens before the animation of hide()
is finished and results in the following error:
ERROR TypeError: this._element is null
completeCallback offcanvas.js:124
execute index.js:203
handler index.js:221
Angular 10
triggerTransitionEnd index.js:76
executeAfterTransition index.js:226
Angular 21
executeAfterTransition index.js:224
_queueCallback base-component.js:48
hide offcanvas.js:132
close compact-navigation.component.ts:88
navigate compact-navigation.component.ts:96
Code line:
Line 145 in 0a005b3
Expectation: Offcanvas should not continue hiding when disposed already.
Reduced test cases
- click button to open offcanvas
- click button in offcanvas
- observe console error
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Firefox
What version of Bootstrap are you using?
5.3.5