bug(cdk-menu): cdkMenuTriggerFor within cdkContextMenuTriggerFor causes repositioning when hovered
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla riproduzione Stackblitz collegata e confrontala con la dev-app del repository dei componenti. Riproduci il riposizionamento del menu contestuale facendo clic con il pulsante destro del mouse su Lucas ipsum e passando il mouse sul pulsante Open Context Menu; il lavoro è completato quando il menu rimane nella sua posizione originale passando il mouse sul trigger annidato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100