Bug 285513 Selected options pane fails to persist if the last selected pane no longer exists

patch by dave.townsend@blueprintit.co.uk r=mconnor a=shaver
This commit is contained in:
timeless%mozdev.org 2005-06-09 20:02:16 +00:00
parent 6a4e3e9f81
commit d884d8eec9

View File

@ -497,11 +497,19 @@
}
var panes = this.preferencePanes;
var lastPane = null;
if (this.lastSelected) {
lastPane = document.getElementById(this.lastSelected);
if (!lastPane) {
this.lastSelected = null;
}
}
var paneToLoad;
if ("arguments" in window && window.arguments[0])
if ("arguments" in window && window.arguments[0] && document.getElementById(window.arguments[0]))
paneToLoad = document.getElementById(window.arguments[0]);
else if (this.lastSelected)
paneToLoad = document.getElementById(this.lastSelected);
else if (lastPane)
paneToLoad = lastPane;
else
paneToLoad = panes[0];