Skip to content

fix(dialog): backdrop not detaching if container view is destroyed #20232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

devversion
Copy link
Member

We recently refactored the Material dialog so that it can be used
as base class for the MDC based dialog. For this, we slightly changed
how animations are announced to the corresponding dialog ref. This
was done because the MDC dialog does not use Angular animations.

It looks like we slightly regressed in cases where the dialog container view
is destroyed immediately upon dialog close. This is because we accidentally
no longer notify the dialog ref if the dialog animation state goes from * to
void. Currently we only handle * to exit while we should also handle the
void state.

This issue has not surfaced in any of our tests, in the dev-app but one screenshot
test inside g3 seems flaky after the dialog refactor. This might fix it (given the
diff showing an extra backdrop if we interpret it correctly).

We recently refactored the Material dialog so that it can be used
as base class for the MDC based dialog. For this, we slightly
changed how animations are announced to the corresponding dialog
ref. This was done because the MDC dialog does not use Angular
animations.

It looks like we slightly regressed in cases where the dialog
container view is destroyed immediately upon dialog close. This
is because we accidentally no longer notify the dialog ref if
the dialog animation state goes from `*` to `void`. Currently we
only handle `*` to `exit` while we should also handle the `void`
state.

This issue has not surfaced in any of our tests, in the dev-app but
one screenshot test inside g3 seems flaky after the dialog refactor.
@devversion devversion added P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release labels Aug 7, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 7, 2020
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Aug 7, 2020
@andrewseguin andrewseguin merged commit 199f728 into angular:master Aug 13, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants