Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(dialog): cancel instead of hiding when user escapes/clicks out
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Oct 6, 2014
1 parent 1d79c4b commit 0cc21d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function MaterialDialogService($timeout, $rootElement, $materialEffects, $animat
if (options.escapeToClose) {
options.rootElementKeyupCallback = function(e) {
if (e.keyCode === Constant.KEY_CODE.ESCAPE) {
$timeout($dialogService.hide);
$timeout($dialogService.cancel);
}
};

Expand All @@ -191,7 +191,7 @@ function MaterialDialogService($timeout, $rootElement, $materialEffects, $animat
options.dialogClickOutsideCallback = function(e) {
// Only close if we click the flex container outside the backdrop
if (e.target === element[0]) {
$timeout($dialogService.hide);
$timeout($dialogService.cancel);
}
};

Expand Down

0 comments on commit 0cc21d4

Please sign in to comment.