Skip to content

Commit

Permalink
Close Dialog by clicking ouside of it
Browse files Browse the repository at this point in the history
Closes a model/dialog by clicking the greyed out area outside of it.
This functionality is the same as if the user clicked the esc key.
  • Loading branch information
ajbozarth committed Feb 14, 2020
1 parent 7a97756 commit 48860c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/apputils/src/dialog.ts
Expand Up @@ -271,6 +271,7 @@ export class Dialog<T> extends Widget {
if (!content.contains(event.target as HTMLElement)) {
event.stopPropagation();
event.preventDefault();
this.reject();
return;
}
for (let buttonNode of this._buttonNodes) {
Expand Down

0 comments on commit 48860c2

Please sign in to comment.