зеркало из https://github.com/mozilla/pjs.git
Bug 309030 Don't scroll to found link on findbar close r=mconnor
This commit is contained in:
Родитель
a567b0b7d9
Коммит
ff1efb5007
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче