Bug 266368 - Find bar is disabled when closed with 'match case' focused. r+a=mconnor

git-svn-id: svn://10.0.0.236/trunk@177521 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla.mano%sent.com 2005-08-10 22:22:35 +00:00
parent 5cd64e08fb
commit b05cbf0f7b

View File

@ -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);