Bug: NgbOffcanvasStack doesnt act as stack when multiple offcanvas are opend
Author: badinmichalCreated Jul 14, 2026Updated Jul 14, 2026
When u open Offcanvas, NgbOffcanvas.activeInstance returns instance of current opened offcanvas. Then u open another one NgbOffcanvas.activeInstance returns the second instance. Then when u close the latest Offcanvas, NgbOffcanvas.activeInstance returns undefined even though there is still one instance openend.
Also the same can be applied to hasOpenOffcanvas...
In documentation: activeInstance - Returns an observable that holds the active offcanvas instance. hasOpenOffcanvas - Indicates if there is currently an open offcanvas in the application.
Source: ng-bootstrap/ng-bootstrap