зеркало из https://github.com/mozilla/pjs.git
284084 - setting "ask before sanitizing" and "sanitize on shutdown" opens a broken sanitize window on shutdown.
This commit is contained in:
Родитель
ec5ff278c0
Коммит
cffe704b58
|
@ -88,7 +88,8 @@
|
|||
// In non-instant apply mode, we must try and use the last saved state
|
||||
// from any previous opens of a child dialog instead of the value from
|
||||
// preferences, to pick up any edits a user may have made.
|
||||
if (document.documentElement.type == "child" && !this.instantApply) {
|
||||
if (document.documentElement.type == "child" &&
|
||||
!this.instantApply && window.opener) {
|
||||
var pdoc = window.opener.document;
|
||||
var lastStatePref = pdoc.getElementById(window.location.href + "#" + this.id);
|
||||
this._setValue(lastStatePref ? lastStatePref.value
|
||||
|
@ -758,7 +759,7 @@
|
|||
if (!this._fireEvent("beforeaccept", this))
|
||||
return;
|
||||
|
||||
if (this.type == "child") {
|
||||
if (this.type == "child" && window.opener) {
|
||||
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var instantApply = psvc.getBoolPref("browser.preferences.instantApply");
|
||||
|
|
Загрузка…
Ссылка в новой задаче