bug(cdk-menu): cdkMenuTriggerFor within cdkContextMenuTriggerFor causes repositioning when hovered
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
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
Using a `[cdkMenuTriggerFor]` within a container that has a `[cdkContextMenuTriggerFor]` for the same cdkMenu.
Current behavior:
When a cdkMenu is opened by the `[cdkContextMenuTriggerFor]` the cdkMenu it will be repositioned to the `[cdkMenuTriggerFor]` when the `[cdkMenuTriggerFor]` is hovered.
Expected behavior:
the cdkMenu should stay at its current location, even if `[cdkMenuTriggerFor]` is hovered.
In case this is confirmed as a bug, I could provide a PR fixing the issue
### Reproduction
Stackblitz: https://stackblitz.com/edit/components-issue-uo4741?file=src/app/example-component.html
Steps to reproduce:
1. Right click on Lucas ipsum
2. hover Open Context Menu button
### Expected Behavior
contextMenu does not change position
### Actual Behavior
contextMenu moves to the location of the button trigger
### Environment
- Angular: 15
- CDK/Material: 15
- Browser(s): Firefox, Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
Can also be reproduced with the dev-app in the components repo
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction Stackblitz liée et comparez-la avec la dev-app du dépôt de composants. Reproduisez le repositionnement du menu contextuel en faisant un clic droit sur Lucas ipsum et en survolant le bouton Open Context Menu ; c'est terminé lorsque le menu reste à son emplacement d'origine lors du survol du trigger imbriqué.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100