зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6686ece287
Коммит
020647d91a
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче