Skip to content

PrimeNG Menu component is not destroyed on navigation #19455

@jonnomk

Description

@jonnomk

Describe the bug

PrimeNG menu has regressed from a recent fix. In the latest version (21.1.2), if you open a menu and then navigate away using mouse buttons or some other way that doesn't involve interacting with the page, the menu stays visible and is no longer dismissible.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/run?file=src%2Fapp%2Fmenu-popup-demo.ts

Environment

Windows 11

Angular version

21.2.0

PrimeNG version

v21

Node version

No response

Browser(s)

Chrome

Steps to reproduce the behavior

Open a menu and then navigate away using mouse buttons or some other way that doesn't involve interacting with the page

EDIT: In fact, any kind of navigation, be it clicking on a menu item keeps the mene in place. This is a massive regression.

Recording.2026-03-04.101724.mp4

Expected behavior

The menu should disappear

Metadata

Metadata

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions