mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Bug 627851 - PreferencesView._delayedInit is not delayed enough [r=mfinkle]
This commit is contained in:
parent
798a667255
commit
b5120ebfb6
@ -743,8 +743,14 @@ var BrowserUI = {
|
||||
Elements.panelUI.hidden = false;
|
||||
Elements.contentShowing.setAttribute("disabled", "true");
|
||||
|
||||
if (aPage != undefined)
|
||||
if (aPage) {
|
||||
this.switchPane(aPage);
|
||||
} else {
|
||||
// Fire a "select" event anyway so listeners know when the panel is opened.
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("select", true, true);
|
||||
document.getElementById("panel-items").dispatchEvent(event);
|
||||
}
|
||||
},
|
||||
|
||||
hidePanel: function hidePanel() {
|
||||
|
@ -41,7 +41,7 @@ var PreferencesView = {
|
||||
_msg: null,
|
||||
_restartCount: 0,
|
||||
|
||||
_messageActions: function ev__messageActions(aData) {
|
||||
_messageActions: function pv__messageActions(aData) {
|
||||
if (aData == "prefs-restart-app") {
|
||||
// Notify all windows that an application quit has been requested
|
||||
var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
|
||||
@ -107,13 +107,15 @@ var PreferencesView = {
|
||||
let panels = document.getElementById("panel-items");
|
||||
panels.addEventListener("select",
|
||||
function(aEvent) {
|
||||
if (aEvent.target != panels)
|
||||
return;
|
||||
if (panels.selectedPanel.id == "prefs-container")
|
||||
self._delayedInit();
|
||||
},
|
||||
false);
|
||||
},
|
||||
|
||||
_delayedInit: function ev__delayedInit() {
|
||||
_delayedInit: function pv__delayedInit() {
|
||||
if (this._languages)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user