Fixing bug 266346. Make sure popup state is reset while modal dialogs DOM are open. r+sr=bzbarsky@mit.edu

This commit is contained in:
jst%mozilla.jstenback.com 2004-10-28 03:39:37 +00:00
Родитель 6686ece287
Коммит 020647d91a
1 изменённых файлов: 12 добавлений и 0 удалений

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

@ -2306,6 +2306,10 @@ GlobalWindowImpl::Alert(const nsAString& aString)
// pending reflows.
EnsureReflowFlushAndPaint();
// Reset popup state while opening a window to prevent the current
// state from being active the whole time a modal dialog is open.
nsAutoPopupStatePusher popupStatePusher(openAbused, PR_TRUE);
return prompter->Alert(title, PromiseFlatString(*str).get());
}
@ -2335,6 +2339,10 @@ GlobalWindowImpl::Confirm(const nsAString& aString, PRBool* aReturn)
// pending reflows.
EnsureReflowFlushAndPaint();
// Reset popup state while opening a window to prevent the current
// state from being active the whole time a modal dialog is open.
nsAutoPopupStatePusher popupStatePusher(openAbused, PR_TRUE);
return prompter->Confirm(title, PromiseFlatString(aString).get(), aReturn);
}
@ -2369,6 +2377,10 @@ GlobalWindowImpl::Prompt(const nsAString& aMessage,
title.Assign(aTitle);
}
// Reset popup state while opening a window to prevent the current
// state from being active the whole time a modal dialog is open.
nsAutoPopupStatePusher popupStatePusher(openAbused, PR_TRUE);
nsresult rv = prompter->Prompt(title.get(),
PromiseFlatString(aMessage).get(), nsnull,
aSavePassword,