Bug 952993 - Reset the browser deck offset when finder wraps to the top of the page. r=rsilveira

This commit is contained in:
Jim Mathies 2014-01-14 10:24:28 -06:00
parent 943e67da90
commit ec76e47a82

View File

@ -199,6 +199,14 @@ var FindHelperUI = {
browserShift += this._container.boxObject.height;
}
browserShift += Services.metro.keyboardHeight;
// If the rect top of the selection is above the view, don't shift content
// (or if it's already shifted, shift it back down).
if (aElementRect.y < browserShift) {
browserShift = 0;
}
// Shift the deck so that the selection is within the visible view.
ContentAreaObserver.shiftBrowserDeck(browserShift);
// Adjust for keyboad display and position the text selection rect in