Use the target window's outer window when we're checking for the focused window for fastback. Bug 298077, r=dbaron a=bsmedberg

This commit is contained in:
bryner%brianryner.com 2005-08-06 03:17:28 +00:00
Родитель 48ecfb0eda
Коммит 006c256aff
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -6451,8 +6451,12 @@ WindowStateHolder::WindowStateHolder(JSContext *cx, JSObject *aObject,
nsCOMPtr<nsPIDOMWindow> focusedWindow = do_QueryInterface(focusWinInternal);
// The outer window is used for focus purposes, so make sure that's what
// we're looking for.
nsPIDOMWindow *targetWindow = aWindow->GetOuterWindow();
while (focusedWindow) {
if (focusedWindow == aWindow) {
if (focusedWindow == targetWindow) {
fc->GetFocusedWindow(getter_AddRefs(mFocusedWindow));
fc->GetFocusedElement(getter_AddRefs(mFocusedElement));
break;