Bug 309030 Don't scroll to found link on findbar close r=mconnor

git-svn-id: svn://10.0.0.236/trunk@180553 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
masayuki%d-toybox.com 2005-09-19 04:07:13 +00:00
parent bf1ec0363c
commit 0fd1c9f447

View File

@ -397,8 +397,14 @@ function delayedCloseFindBar()
var focusedElement = document.commandDispatcher.focusedElement;
if (focusedElement && (focusedElement.parentNode == findToolbar ||
focusedElement.parentNode.parentNode == findField)) {
if (gFoundLink)
if (gFoundLink) {
// block scrolling on focus since find already scrolls, further
// scrolling is due to user action, so don't override this
var suppressedScroll = document.commandDispatcher.suppressFocusScroll;
document.commandDispatcher.suppressFocusScroll = true;
gFoundLink.focus();
document.commandDispatcher.suppressFocusScroll = suppressedScroll;
}
else
window.content.focus();
}