angular / angular/components

Vertical positioning of flexible connected overlay on mobile

Ouverte
#13,614 8 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
area: cdk/overlay 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

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la stratégie de positionnement flexibleConnectedTo et la stratégie de défilement reposition du CDK overlay présentées dans le rapport. Reproduisez le problème sur un appareil mobile après avoir fait défiler partiellement la page vers le bas, puis retracez le comportement du positionnement ; le travail est terminé lorsque le flexible connected overlay conserve la position verticale attendue pendant le défilement.

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é
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

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