Skip to content

fix(material/menu): incorrectly detaching lazy content when menu is transferred to a new trigger #31690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025

Conversation

crisbeto
Copy link
Member

The menu has some logic that detaches its lazy content when the animation is finished, however while the animation was running, the panel might've been picked up by another trigger. This ends up opening an empty menu panel to the new trigger.

These changes resolve the issue by checking if another trigger picked up the panel before detaching the lazy content.

Fixes #31687.

…ransferred to a new trigger

The menu has some logic that detaches its lazy content when the animation is finished, however while the animation was running, the panel might've been picked up by another trigger. This ends up opening an empty menu panel to the new trigger.

These changes resolve the issue by checking if another trigger picked up the panel before detaching the lazy content.

Fixes angular#31687.
@crisbeto crisbeto requested a review from a team as a code owner August 13, 2025 07:09
@crisbeto crisbeto requested review from mmalerba and ok7sai and removed request for a team August 13, 2025 07:09
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Aug 13, 2025
@crisbeto crisbeto requested a review from andrewseguin August 13, 2025 16:53
@crisbeto crisbeto removed request for mmalerba and ok7sai August 14, 2025 16:14
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Aug 14, 2025
@crisbeto crisbeto merged commit b1514c4 into angular:main Aug 14, 2025
35 of 37 checks passed
@crisbeto
Copy link
Member Author

The changes were merged into the following branches: main, 20.1.x, 20.2.x

crisbeto added a commit that referenced this pull request Aug 14, 2025
…ransferred to a new trigger (#31690)

The menu has some logic that detaches its lazy content when the animation is finished, however while the animation was running, the panel might've been picked up by another trigger. This ends up opening an empty menu panel to the new trigger.

These changes resolve the issue by checking if another trigger picked up the panel before detaching the lazy content.

Fixes #31687.

(cherry picked from commit b1514c4)
crisbeto added a commit that referenced this pull request Aug 14, 2025
…ransferred to a new trigger (#31690)

The menu has some logic that detaches its lazy content when the animation is finished, however while the animation was running, the panel might've been picked up by another trigger. This ends up opening an empty menu panel to the new trigger.

These changes resolve the issue by checking if another trigger picked up the panel before detaching the lazy content.

Fixes #31687.

(cherry picked from commit b1514c4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: material/menu target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(menu): options fail to load in some cases
2 participants