angular / angular/components

Open menu should support background scrolling

Ouverte
#6,927 9 commentaires 12 réactions 0 personnes assignées Voir sur GitHub
area: material/menu 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? Reading the source, when having a menu open, I believe the background should be able to be scrolled using the mouse. The background can be scrolled with the arrow keys.

#### What is the expected behavior?
The background can scroll.

#### What is the current behavior?
The background cannot scroll.

#### What are the steps to reproduce?

1. Visit https://material.angular.io/components/menu/overview
2. Open the menu by clicking the trigger: "Menu"
3. Attempt to scroll the page (not the menu) using the mouse.

#### What is the use-case or motivation for changing an existing behavior?
A dialog box should block background scrolling, but the menu should not.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Current

#### Is there anything else we should know?
It is blocked by `pointer-events: auto`: https://github.com/angular/material2/blob/4d82f833c7e4a22814b8e225f05ef4ba01a86ad6/src/cdk/overlay/_overlay.scss#L61.
The menu does have the scroll strategy of reposition, which I believe should mean that the background should be able to be scrolled: https://github.com/angular/material2/blob/fe37cb2551929844d5467e1b9bf45032df35981f/src/lib/menu/menu-trigger.ts#L57

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez le problème à l’URL de présentation du menu Material, puis lisez src/cdk/overlay/_overlay.scss autour de pointer-events et src/lib/menu/menu-trigger.ts autour de la stratégie de défilement du menu. Vérifiez que le défilement à la souris fait défiler la page lorsqu’un menu est ouvert, sans modifier le comportement de la boîte de dialogue décrit dans le rapport.

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é
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

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