Skip to content

Dialog beforeClose and afterClosed events are not firing on closing dialog using scroll #11507

@Quake11

Description

@Quake11

Bug, feature request, or proposal:

Dialog beforeClose event not firing when closing using scroll in dialog with scroll strategy "overlay.scrollStrategies.close()"

What is the expected behavior?

Close events should fire on scroll

What is the current behavior?

After using scroll in opened dialog which uses scroll strategy "overlay.scrollStrategies.close()", beforeClose and afterClosed events are not firing, although the dialog is closing normally.
Affected only closing dialog by scroll, other ways of closing dialog are properly firing events.
Also, dialog closing animation with scroll is broken.

What are the steps to reproduce?

StackBlitz
https://stackblitz.com/edit/angular-material2-dialog-beforeclose-bug

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

Tested in Chrome, Safari and Firefox on Mac OS
"dependencies": {
"@angular/animations": "^6.0.3",
"@angular/cdk": "^6.1.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.1.0",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/platform-server": "^6.0.3",
"@angular/router": "^6.0.3",
},

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions