mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 511673, hidden panels have an empty state, but should be 'closed', r=roc
This commit is contained in:
parent
d03f7cb4cd
commit
7f629101b9
@ -232,6 +232,9 @@ nsPopupBoxObject::EnableKeyboardNavigator(PRBool aEnableKeyboardNavigator)
|
||||
NS_IMETHODIMP
|
||||
nsPopupBoxObject::GetPopupState(nsAString& aState)
|
||||
{
|
||||
// set this here in case there's no frame for the popup
|
||||
aState.AssignLiteral("closed");
|
||||
|
||||
nsMenuPopupFrame *menuPopupFrame = GetMenuPopupFrame();
|
||||
if (menuPopupFrame) {
|
||||
switch (menuPopupFrame->PopupState()) {
|
||||
@ -247,7 +250,6 @@ nsPopupBoxObject::GetPopupState(nsAString& aState)
|
||||
aState.AssignLiteral("hiding");
|
||||
break;
|
||||
case ePopupClosed:
|
||||
aState.AssignLiteral("closed");
|
||||
break;
|
||||
default:
|
||||
NS_NOTREACHED("Bad popup state");
|
||||
|
@ -30,6 +30,8 @@
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<panel id="hiddenpanel" hidden="true"/>
|
||||
|
||||
<panel id="panel" onpopupshown="panelOpened()"
|
||||
onpopuphidden="$('button').focus(); $('button').open = true">
|
||||
<textbox/>
|
||||
@ -56,6 +58,8 @@ SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTests()
|
||||
{
|
||||
is($("hiddenpanel").state, "closed", "hidden popup is closed");
|
||||
|
||||
var menu = $("menu");
|
||||
menu.open = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user