angular / angular/components

[MatSidenav] Sidenav Toggling Can Cause Content Shifting

Đang mở
#12,349 3 bình luận 7 reaction 0 người được giao Xem trên GitHub
area: material/sidenav P3
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

#### What is the expected behavior?
Mat-sidenav-content is not moved from original position upon quick mat-sidenav toggles

#### What is the current behavior?
Quick mat-sidenav toggles can cause mat-sidenav-content to be shifted over until the drawer is toggled again

#### What are the steps to reproduce?

Set the autofocus on mat-sidenav to true, and place a focusable input in the mat-sidenav
Click the 'open drawer' button quickly and repeatedly until the content shifts. Click the button again and the content will shift back.

https://stackblitz.com/edit/angular-eesonu

#### What is the use-case or motivation for changing an existing behavior?
Use-case: User accidentally opens the drawer and quickly presses again to undo the action. This will result in possibly all content on the page not being displayed.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 6.0.9
Material: 6.4.1

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

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi trong StackBlitz được liên kết với autofocus được bật và một input có thể nhận focus bên trong MatSidenav, sau đó kiểm tra hành vi của MatSidenav và mat-sidenav-content trong quá trình chuyển đổi nhanh. Công việc được xem là hoàn tất khi các thao tác mở và đóng lặp lại không còn khiến mat-sidenav-content bị dịch chuyển và không cần thực hiện thêm một lần chuyển đổi để khôi phục vị trí của nó.

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/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.