angular / angular/components

cdk-global-scrollblock not removed when navigating while dialog is being closed

Offen
#5,864 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: cdk/scrolling area: material/dialog P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
cdk-global-scrollblock is removed from document when the router navigates to a new route while the dialog is being closed (not yet tested if the same happens while navigating when a dialog is open)

#### What is the current behavior?
When navigating while closing the dialog, the class cdk-global-scrollblock will not be removed from document and scrolling is not possible anymore.

#### What are the steps to reproduce?
Open a dialog, call this.mdDialogRef.close() and immediately navigate to a different route. It can be solved easily by observing this.mdDialogRef.afterClosed but I think that the framework should ensure that cdk-global-scrollblock gets removed when navigating.

#### What is the use-case or motivation for changing an existing behavior?

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.3.0
Material: 2.0.0-beta.8-dd230a3
CDK: 2.0.0-beta.8-dd230a3
OS: Linux
Typescript: 2.3.4
Browsers: Chrome

#### Is there anything else we should know?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduzieren Sie das Problem, indem Sie einen Dialog öffnen, mdDialogRef.close() aufrufen und sofort zu einer anderen Route navigieren. Verfolgen Sie den Lebenszyklus beim Schließen des Dialogs und die Bereinigung von cdk-global-scrollblock; abgeschlossen ist dies, wenn die Klasse aus document entfernt wurde und das Scrollen nach der Navigation weiterhin möglich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.