diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 682ec5b13c5..1cdcf5dbcb4 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -2412,10 +2412,8 @@ static void CheckForFocus(nsPIDOMWindow* aOurWindow, nsIFocusController* aFocusC if (domWindow == focusedWindow) { PRBool active; aFocusController->GetActive(&active); - aFocusController->SetFocusedElement(nsnull); if(active) { - // We need to restore focus and make sure we null - // out the focused element. + // We need to restore focus to the window. domWindow->Focus(); } } diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 682ec5b13c5..1cdcf5dbcb4 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -2412,10 +2412,8 @@ static void CheckForFocus(nsPIDOMWindow* aOurWindow, nsIFocusController* aFocusC if (domWindow == focusedWindow) { PRBool active; aFocusController->GetActive(&active); - aFocusController->SetFocusedElement(nsnull); if(active) { - // We need to restore focus and make sure we null - // out the focused element. + // We need to restore focus to the window. domWindow->Focus(); } }