angular / angular/components

Open menu should support background scrolling

Đang mở
#6,927 9 bình luận 12 reaction 0 người được giao Xem trên GitHub
area: material/menu P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện vấn đề tại URL tổng quan về menu Material, sau đó đọc src/cdk/overlay/_overlay.scss xung quanh pointer-events và src/lib/menu/menu-trigger.ts xung quanh chiến lược cuộn của menu. Xác minh rằng thao tác cuộn bằng chuột làm trang di chuyển khi một menu đang mở, mà không thay đổi hành vi của hộp thoại được mô tả trong báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.