angular / angular/components

Full-screen overlay container doesn't work when fullscreen element is within an overlay

Ouverte
#10,679 15 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
area: cdk/overlay P3
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:
I believe this might be a bug.
In this example I try to load a snackbar into a container using the `viewContainerRef` config.
https://stackblitz.com/edit/angular-material-tooltip-in-container

#### What is the expected behavior?
The snackbar should align itself to the viewContainerRef that is provided.

#### What is the current behavior?
But the `_createOverlay` function does not look at this config and always creates the overlay using the `GlobalPositionStrategy` instead of `ConnectedPositionStrategy`.

There could be another root cause, and if there is please let me know.

#### What are the steps to reproduce?
I have provided a stackblitz above.

#### What is the use-case or motivation for changing an existing behavior?
There is a hand full of times i would like to load the snackbar in a container.
One in particular is the div has been maximized to full screen (so the window is not visible).
Therefore the snackbar is not visible.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
latest.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et le point d’entrée `_createOverlay`. Suivez la manière dont la configuration `viewContainerRef` de la snackbar est traitée par rapport aux stratégies de positionnement globales et connectées, puis vérifiez qu’une snackbar est visible et alignée à l’intérieur d’un conteneur d’overlay en plein écran.

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é
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

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