Skip to content

Commit

Permalink
Do nothing, if someone already prevent window closing
Browse files Browse the repository at this point in the history
(workaround for #53, part 4; also related to #36 in SeaMonkey)
  • Loading branch information
Infocatcher committed May 1, 2013
1 parent e62d166 commit 9743c5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ var windowsObserver = {
var window = e.currentTarget;
_log("windowClosingHandler() [" + e.type + "]");
if(e.type == "close" || e.type == "beforeunload") {
if(e.defaultPrevented) {
_log(e.type + ": Someone already prevent window closing");
return;
}
if(
this.hasPrivateTab(window)
&& this.isLastPrivate(window)
Expand Down

0 comments on commit 9743c5b

Please sign in to comment.