-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Closed
Copy link
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/menu
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When CDK Menu is placed in component inside ShadowDom-encapsulated component, the menu trigger does open the menu, but does not toggle it (when it's open then the click doesn't closes it).
I tracked the issue down through cdk Menu -> overlayRef -> PortalOutlet -> isAttached()
Reproduction
Steps to reproduce:
- Have ShadowDom component
- Put Angular CDK Menu in this component
- Try to toggle cdkMenuTriggerFor
Expected Behavior
Should work same as when not in ShadowDom component.
Actual Behavior
cdkMenuTriggerFor inside ShadowDom doesn't toggle Menu.
Here is the stackblitz with reproducted bug:
https://stackblitz.com/edit/angular-ivy-rq5d9a?file=src/app/app.module.ts
Stackblitz is ng 14, but this bug is still there in Angular 15.
Environment
- Angular: 15^
- CDK/Material: 15^
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/menu