зеркало из https://github.com/mozilla/gecko-dev.git
fix for 138231. Select a tab if the last selected one is not ``in view''. r=suresh, sr=alecf
This commit is contained in:
Родитель
b1e49549fb
Коммит
62691b659d
|
@ -300,7 +300,8 @@ function (force_reload)
|
||||||
sidebarObj.collapsed = false;
|
sidebarObj.collapsed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sidebarObj.panels.num_panels_included() > gNumTabsInViewPref)
|
var num_included = sidebarObj.panels.num_panels_included();
|
||||||
|
if (num_included > gNumTabsInViewPref)
|
||||||
document.getElementById("nav-buttons-box").hidden = false;
|
document.getElementById("nav-buttons-box").hidden = false;
|
||||||
else
|
else
|
||||||
document.getElementById("nav-buttons-box").hidden = true;
|
document.getElementById("nav-buttons-box").hidden = true;
|
||||||
|
@ -364,6 +365,18 @@ function (force_reload)
|
||||||
header.setAttribute("in-view", true);
|
header.setAttribute("in-view", true);
|
||||||
num_in_view++;
|
num_in_view++;
|
||||||
|
|
||||||
|
// (a) when we have hit the maximum number of tabs that can be in view and no tab
|
||||||
|
// has been selected yet
|
||||||
|
// -or-
|
||||||
|
// (b) when we have reached the last tab we are about to display
|
||||||
|
if ( ((num_in_view == num_included) ||
|
||||||
|
(num_in_view == gNumTabsInViewPref)) &&
|
||||||
|
!is_after_selected )
|
||||||
|
{
|
||||||
|
selected_id = id;
|
||||||
|
this.node.setAttribute('last-selected-panel', id);
|
||||||
|
}
|
||||||
|
|
||||||
// Pick sandboxed, or unsandboxed iframe
|
// Pick sandboxed, or unsandboxed iframe
|
||||||
var iframe = panel.get_iframe();
|
var iframe = panel.get_iframe();
|
||||||
var load_state;
|
var load_state;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче