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
Родитель 550c60801f
Коммит fd155e3c35
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -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];