mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
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:
parent
6a4e3e9f81
commit
d884d8eec9
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user