bug(cdk-menu): cdkMenuTriggerFor within cdkContextMenuTriggerFor causes repositioning when hovered
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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
Guía de contribución
Línea de trabajo
Comienza con la reproducción enlazada de Stackblitz y compárala con la dev-app del repositorio de componentes. Reproduce el reposicionamiento del menú contextual haciendo clic derecho en Lucas ipsum y pasando el cursor sobre el botón Open Context Menu; se considera terminado cuando el menú permanece en su ubicación original al pasar el cursor sobre el trigger anidado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100