зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
550c60801f
Коммит
fd155e3c35
|
@ -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];
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче