Bug 1130411 - only care about unload if it involves the page we opened, r=jaws

This commit is contained in:
Gijs Kruitbosch
2015-03-16 17:05:18 -07:00
parent d7cc8df1aa
commit 02e75e6468

View File

@@ -50,6 +50,7 @@ let gSubDialog = {
this._closingEvent = null;
this._isClosing = false;
this._openedURL = aURL;
features = features.replace(/,/g, "&");
let featureParams = new URLSearchParams(features.toLowerCase());
@@ -124,7 +125,7 @@ let gSubDialog = {
/* Private methods */
_onUnload: function(aEvent) {
if (aEvent.target.location.href != "about:blank") {
if (aEvent.target.location.href == this._openedURL) {
this.close(this._closingEvent);
}
},