Open
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
14
Description
afterOpened
is not emitted when the dialog is closed too fast.
Reproduction
I noticed this issue running some e2e tests but it also can be manually reproduced: basically just go to https://stackblitz.com/edit/afteropened-not-always-emitted-15 and double click on the button.
Expected Behavior
afterOpened
should always emit a value before closing the dialog like in v14.
https://stackblitz.com/edit/afteropened-not-always-emitted-14
Actual Behavior
afterOpened
is not emitted when the dialog is closed too fast.
https://stackblitz.com/edit/afteropened-not-always-emitted-15
Environment
- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
crisbeto commentedon Dec 25, 2022
Currently this is working as expected.
afterOpened
emits after the opening sequence has finished which doesn't happen if you close it too quickly.romainmoreau commentedon Dec 25, 2022
It should be possible to simulate the previous behavior by combining
beforeClosed
andafterOpened
but I think the behavior in v14 made more sense because it was simplier and more intuitive:Maybe at least it should be mentionned somewhere because it silently breaks code migrated to v15 expecting
afterOpened
to be always emitted.