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

This commit is contained in:
masayuki%d-toybox.com 2005-09-19 04:07:13 +00:00
Родитель a567b0b7d9
Коммит ff1efb5007
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -397,8 +397,14 @@ function delayedCloseFindBar()
var focusedElement = document.commandDispatcher.focusedElement; var focusedElement = document.commandDispatcher.focusedElement;
if (focusedElement && (focusedElement.parentNode == findToolbar || if (focusedElement && (focusedElement.parentNode == findToolbar ||
focusedElement.parentNode.parentNode == findField)) { 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(); gFoundLink.focus();
document.commandDispatcher.suppressFocusScroll = suppressedScroll;
}
else else
window.content.focus(); window.content.focus();
} }