Bug 513949: avoid scrollTo on open, since it slows down awesomebar appearance, r=mfinkle

This commit is contained in:
Gavin Sharp 2009-09-01 14:05:43 -04:00
parent 1cf346996d
commit 5ff6d0eca0

View File

@ -161,6 +161,13 @@
this.collapsed = true;
this._popupOpen = false;
// Scroll to the top left for the next open (only if necessary).
// Doing this now rather than in open() turns out to be faster,
// possibly because it avoids scrolling too soon after we uncollapse
// ourselves
if (this._items.scrollTop || this._items.scrollLeft)
this._scrollBoxObject.scrollTo(0, 0);
BrowserUI.showToolbar();
BrowserUI.popDialog();
]]></body>
@ -182,10 +189,6 @@
if (!this.popupOpen)
return;
// Scroll to the top left if only if necessary
if (this._items.scrollTop || this._items.scrollLeft)
this._scrollBoxObject.scrollTo(0, 0);
let controller = this.input.controller;
let searchString = controller.searchString;
let items = this._items;