Skip to content

Snackbar not dismissed immediately after Dialog is Closed #6763

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

Closed
ghost opened this issue Aug 31, 2017 · 7 comments
Closed

Snackbar not dismissed immediately after Dialog is Closed #6763

ghost opened this issue Aug 31, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 31, 2017

Bug, feature request, or proposal:

When opening a snackbar after the close event of Dialog the snackbar is never dismissed

What is the expected behavior?

The snackbar should be dismissed/closed after the duration timout

What is the current behavior?

The snackbar never dismisses. When moved out of the subscribe block of the afterClosed function it works but thats not the intended behaviour

What are the steps to reproduce?

        let dialogRef = this.dialog.open(DeleteChapterDialogComponent);
        dialogRef.afterClosed().subscribe((result: any) => {
            this.snackBar.open('LOL','OK', { duration: 100 });
        });

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

"@angular": "4.1.3",
"@angular/material": "2.0.0-beta.8",
@ghost ghost changed the title Snackbar not dismissed immediately after Dialog Snackbar not dismissed immediately after Dialog is Closed Aug 31, 2017
@josephperrott
Copy link
Member

@teterovic can you provide a plunker with a reproduction?

I was unable to reproduce this error myself on plunker.

@ghost
Copy link
Author

ghost commented Sep 1, 2017

@josephperrott I will try to update my project to Beta.10, i cant find a nice plunker with beta.8.
Either way it seems to be fixed in beta.10, but i will test it in my project too after the update maybe it's something else.

@ghost
Copy link
Author

ghost commented Sep 1, 2017

Ok found the bug. Please replace
BrowserAnimationsModule with NoopAnimationsModule

Haven't tested it with beta.10, just beta 8

plunkr
https://plnkr.co/edit/0UnXbq76xsaLBEyrEn8S?p=preview

@ghost
Copy link
Author

ghost commented Sep 1, 2017

sorry this plunkr:
https://plnkr.co/edit/0UnXbq76xsaLBEyrEn8S?p=preview

@willshowell
Copy link
Contributor

Maybe related to #6719?

@josephperrott
Copy link
Member

@teterovic I was able to confirm that this is resolved with #6736.

@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 Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants