Bug 393791. Don't allow menus to open before we've generated their child frames. r=enn,sr=neil,a=beltzner

This commit is contained in:
2008-04-22 20:05:54 -07:00
parent b5ec1842c9
commit b4ab02a2bc
3 changed files with 13 additions and 19 deletions

View File

@@ -312,7 +312,8 @@ nsMenuPopupFrame::SetPreferredBounds(nsBoxLayoutState& aState,
void
nsMenuPopupFrame::AdjustView()
{
if (mPopupState == ePopupOpen || mPopupState == ePopupOpenAndVisible) {
if ((mPopupState == ePopupOpen || mPopupState == ePopupOpenAndVisible) &&
mGeneratedChildren) {
// if the popup has just opened, make sure the scrolled window is at 0,0
if (mIsOpenChanged) {
nsIBox* child = GetChildBox();