Bug 918222: Misc null error in browser.js, r=mfinkle

This commit is contained in:
Mark Capella 2013-09-24 18:34:12 -04:00
parent 4f5528be3e
commit 0a1fb32765

View File

@ -5136,10 +5136,16 @@ var FormAssistant = {
// Reset invalid submit state on each pageshow
case "pageshow":
let target = aEvent.originalTarget;
let selectedDocument = BrowserApp.selectedBrowser.contentDocument;
if (target == selectedDocument || target.ownerDocument == selectedDocument)
this._invalidSubmit = false;
if (!this._invalidSubmit)
return;
let selectedBrowser = BrowserApp.selectedBrowser;
if (selectedBrowser) {
let selectedDocument = selectedBrowser.contentDocument;
let target = aEvent.originalTarget;
if (target == selectedDocument || target.ownerDocument == selectedDocument)
this._invalidSubmit = false;
}
}
},