angular / angular/components

Menu: Overlay is blocking click and contextmenu events

Abierto
#9,320 9 comentarios 44 reacciones 0 asignados Ver en GitHub
area: cdk/overlay area: material/menu feature P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
When menu is open, any click event (including context menu events) outside of the menu and targeting clickable items, is expected to work from the first time. Menu should be closed along with the action handled by the clicked item.

#### What is the current behavior?
Overlay is blocking click events (context menu events). Clicking on the overlay first closes the menu and the user needs to click again to do his desired action (e.g. clicking navigation item that).

#### What are the steps to reproduce?
1. Go to documents/demo page.
1. Navigate to Components -> Menu
1. Click on the first example for demo
1. Try to click any other component page from the left navigation - Component page will open after second click attempt ( after the menu is closed ).

#### What is the use-case or motivation for changing an existing behavior?
The current functionality is a bad UX decision. Users usually expect to execute actions with one click (closing menu is counted towards the executed action). Making the user to click twice to close the menu and then proceed to the desired action is frustrating and not likely acceptable by most projects.

It also causes issues if developers want to do custom context menu with the Menu component.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
* Angular 5.1.0
* Material 5.0.2

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza reproduciendo el problema en la página documents/demo, en Components -> Menu, usando el primer ejemplo y la navegación izquierda. Sigue cómo el overlay del menú gestiona los eventos click y contextmenu; se considera terminado cuando un destino en el exterior en el que se puede hacer clic cierra el menú y ejecuta su acción en la primera interacción.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, 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
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.