зеркало из https://github.com/mozilla/gecko-dev.git
Bug 266368 - Find bar is disabled when closed with 'match case' focused. r+a=mconnor
This commit is contained in:
Родитель
de81fd6373
Коммит
1a3a0b4e33
|
@ -372,17 +372,21 @@ function setFoundLink(foundLink)
|
|||
function delayedCloseFindBar()
|
||||
{
|
||||
var findField = document.getElementById("find-field");
|
||||
var findToolbar = document.getElementById("FindToolbar");
|
||||
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
if (window == ww.activeWindow && document.commandDispatcher.focusedElement &&
|
||||
document.commandDispatcher.focusedElement.parentNode.parentNode == findField) {
|
||||
if (gFoundLink)
|
||||
gFoundLink.focus();
|
||||
else
|
||||
window.content.focus();
|
||||
|
||||
if (window == ww.activeWindow) {
|
||||
var focusedElement = document.commandDispatcher.focusedElement;
|
||||
if (focusedElement && (focusedElement.parentNode == findToolbar ||
|
||||
focusedElement.parentNode.parentNode == findField)) {
|
||||
if (gFoundLink)
|
||||
gFoundLink.focus();
|
||||
else
|
||||
window.content.focus();
|
||||
}
|
||||
}
|
||||
|
||||
var findToolbar = document.getElementById("FindToolbar");
|
||||
findToolbar.hidden = true;
|
||||
setFindMode(FIND_NORMAL);
|
||||
setFoundLink(null);
|
||||
|
|
Загрузка…
Ссылка в новой задаче