angular / angular/components

Menu: Overlay is blocking click and contextmenu events

Ouverte
#9,320 9 commentaires 44 réactions 0 personnes assignées Voir sur GitHub
area: cdk/overlay area: material/menu feature P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par reproduire le problème sur la page documents/demo, sous Components -> Menu, en utilisant le premier exemple et la navigation de gauche. Suivez la gestion des événements click et contextmenu par l’overlay du menu ; c’est terminé lorsqu’une cible cliquable extérieure ferme le menu et exécute son action dès la première interaction.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, 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
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.