Bug 588736 - Background tabs don't scroll into view when opened from a pinned tab. r=mano

--HG--
extra : rebase_source : 8a4d1132626042757cf9fa3a53a9bd0a2a443d9f
This commit is contained in:
Dão Gottwald 2010-08-19 22:22:33 +02:00
parent 968a42e5e8
commit 58f5b77801

View File

@ -2744,11 +2744,13 @@
return;
if (this.mTabstrip.smoothScroll) {
let selected = this.selectedItem.getBoundingClientRect();
let selected = !this.selectedItem.pinned &&
this.selectedItem.getBoundingClientRect();
// Can we make both the new tab and the selected tab completely visible?
if (Math.max(tab.right - selected.left, selected.right - tab.left) <=
scrollRect.width) {
if (!selected ||
Math.max(tab.right - selected.left, selected.right - tab.left) <=
scrollRect.width) {
this.mTabstrip.ensureElementIsVisible(aTab);
return;
}