Fix JS exception when menulist has no menuitems b=302120 r=bz sr=roc a=asa

This commit is contained in:
neil%parkwaycc.co.uk 2005-08-08 20:59:16 +00:00
parent 93903a1a0d
commit 0df3ca16ac

View File

@ -1745,9 +1745,10 @@ nsMenuPopupFrame::KeyboardNavigation(PRUint32 aKeyCode, PRBool& aHandledFlag)
else
GetPreviousMenuItem(nsnull, &nextItem);
SetCurrentMenuItem(nextItem);
aHandledFlag = PR_TRUE;
if (nextItem) {
aHandledFlag = PR_TRUE;
SetCurrentMenuItem(nextItem);
}
}
else if (mCurrentMenu && isContainer && isOpen) {
if (theDirection == eNavigationDirection_Start) {