angular / angular/components

Vertical positioning of flexible connected overlay on mobile

Đang mở
#13,614 8 bình luận 3 reaction 0 người được giao Xem trên GitHub
area: cdk/overlay 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

#### What is the expected behavior?
Flexible connected overlays are positioned correct even if the user is scrolling

#### What is the current behavior?
Scrolling affects the vertical positioning of the overlay. The overlay is positioned to low.

#### What are the steps to reproduce?
Scroll down a page on a mobile device (not to the end of the page, but somewhere in the middle) and then open the flexible connected overlay. The overlay seems to be positioned to low.

Example desktop:
bildschirmfoto 2018-10-15 um 07 34 49

Example mobile:
bildschirmfoto 2018-10-15 um 07 34 25

Configuration of the overlay:
```
const positionStrategy = this.overlay
.position()
.flexibleConnectedTo(this.elementRef) // <-- elementRef is the icon element from the screenshot
.withPositions([
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' }
])
.withPush(false);
this.overlay.create({
positionStrategy,
scrollStrategy: this.overlay.scrollStrategies.reposition()
});
```

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/core: 6.1.0
@angular/material: 6.4.7
@angular/cdk: 7.0.0-rc.1
typescript: 2.7.2

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

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

Hướng nghiên cứu

Bắt đầu với chiến lược định vị flexibleConnectedTo và chiến lược cuộn reposition của CDK overlay được nêu trong báo cáo. Tái hiện vấn đề trên thiết bị di động sau khi cuộn xuống một phần trang, sau đó theo dõi hành vi định vị; hoàn tất khi flexible connected overlay duy trì vị trí dọc mong đợi trong khi cuộ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ó
3/5
Thời gian dự kiến
1-2 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.