Open menu should support background scrolling
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### 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
贡献指南
调研方向
在 Material 菜单概览 URL 处重现该问题,然后阅读 src/cdk/overlay/_overlay.scss 中 pointer-events 附近的内容,以及 src/lib/menu/menu-trigger.ts 中菜单滚动策略附近的内容。验证菜单打开时使用鼠标滚动会使页面移动,同时不改变报告中描述的对话框行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100