Skip to content

Commit 6285387

Browse files
authored
fix(navigation-menu): clear viewport size when no active content node is present (#336)
1 parent 0575725 commit 6285387

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/primitives/navigation-menu/src/navigation-menu-viewport.directive.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ export class RdxNavigationMenuViewportDirective implements OnInit, OnDestroy {
347347

348348
node.transitionSubscription = null;
349349
this._leavingContentNode.set(null);
350+
351+
if (!this._activeContentNode() && !this.forceMount()) {
352+
this._viewportSize.set(null);
353+
}
350354
} else {
351355
// if this node is NOT the one currently marked as leaving, it means
352356
// a new transition started before this one finished. Just clean up DOM/Sub.

0 commit comments

Comments
 (0)