-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(dialog): add disableClose option #1678
feat(dialog): add disableClose option #1678
Conversation
As mentioned in #1682, I'm thinking we should fold this into a |
a9e4f6f
to
13ebd1b
Compare
13ebd1b
to
3b6fa23
Compare
@@ -25,7 +25,7 @@ import 'rxjs/add/operator/first'; | |||
host: { | |||
'class': 'md-dialog-container', | |||
'[attr.role]': 'dialogConfig?.role', | |||
'(keydown.escape)': 'handleEscapeKey()', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: trailing commas are preferred for this repo
|
||
viewContainerFixture.detectChanges(); | ||
|
||
let backdrop = <HTMLElement> overlayContainerElement.querySelector('.md-overlay-backdrop'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, we're going to start preferring using the as HTMLElement
syntax over this style cast.
(Which I still need to document in our style guide)
let dialogContainer: MdDialogContainer = viewContainerFixture.debugElement.query( | ||
By.directive(MdDialogContainer)).componentInstance; | ||
|
||
dialogContainer.handleEscapeKey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this comment here as well:
// Fake the user pressing the escape key by calling the handler directly.
Adds a config option that allows users to disable closing a dialog via a backdrop click or pressing escape. Fixes angular#1419.
3b6fa23
to
1a3869b
Compare
Addressed the latest set of notes. |
LGTM |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds a config option that allows users to disable closing a dialog via a backdrop click or pressing escape.
Fixes #1419.