зеркало из https://github.com/mozilla/gecko-dev.git
Bug 247116: fix infinite resize loop that causes the UI to jitter when the bookmarks toolbar is empty, patch by Dave Townsend <mossop.bugzilla@blueprintit.co.uk>, r=me
This commit is contained in:
Родитель
405d600298
Коммит
15e056867b
|
@ -974,6 +974,7 @@ var BookmarksToolbar =
|
|||
|
||||
resizeFunc: function(event)
|
||||
{
|
||||
BookmarksToolbarRDFObserver._overflowTimerInEffect = false;
|
||||
if (event && event.type == 'focus')
|
||||
window.removeEventListener('focus', BookmarksToolbar.resizeFunc, false); // hack for bug 266737
|
||||
var buttons = document.getElementById("bookmarks-ptf");
|
||||
|
@ -988,6 +989,11 @@ var BookmarksToolbar =
|
|||
return;
|
||||
}
|
||||
|
||||
if (buttons.childNodes.length == 0) {
|
||||
chevron.collapsed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var chevronWidth = 0;
|
||||
chevron.collapsed = false;
|
||||
chevronWidth = chevron.boxObject.width;
|
||||
|
@ -1015,7 +1021,6 @@ var BookmarksToolbar =
|
|||
}
|
||||
usedWidth += button.boxObject.width;
|
||||
}
|
||||
BookmarksToolbarRDFObserver._overflowTimerInEffect = false;
|
||||
},
|
||||
|
||||
// Fill in tooltips for personal toolbar
|
||||
|
|
Загрузка…
Ссылка в новой задаче