-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Reproduction
StackBlitz example: https://stackblitz.com/edit/components-issue-h6h2vv
Steps to reproduce:
- Provide global error handler for angular
- Throw any Error within async function
Expected Behavior
The lifecycle of the dialog should be triggered and the dialog should display the information
Actual Behavior
The only thing from the dialog class called is the constructor, everything else is not called and the dialog cannot be closed
Environment
- Angular: 7.2.2
- CDK/Material: 7.2.2
- Browser(s): Google Chrome, StackBlitz
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Comment
When I tried it out on my environment, I found out that any resize event (maybe other events too) trigger the lifecycle of the component, it updates and works fine.
On StackBlitz though the events are not triggered in any case, it just renders the app totally unresponsive
So my current solution to this is - dispatching resize event right after opening the dialog, which makes it work fine, but I have no idea why is it failing to trigger the onInit etc. by itself.
Also no .onOpen() or .onOpened() subscriptions emit any data before resize event