diff --git a/AppKit/CPMenu/CPMenu.j b/AppKit/CPMenu/CPMenu.j index 39203dfa7..4cdcd7a16 100644 --- a/AppKit/CPMenu/CPMenu.j +++ b/AppKit/CPMenu/CPMenu.j @@ -75,7 +75,7 @@ var _CPMenuBarVisible = NO, id _delegate; - CPMenuItem _highlightedIndex; + int _highlightedIndex; _CPMenuWindow _menuWindow; } diff --git a/AppKit/CPPopUpButton.j b/AppKit/CPPopUpButton.j index b5ac0e1e1..6072501dd 100644 --- a/AppKit/CPPopUpButton.j +++ b/AppKit/CPPopUpButton.j @@ -662,6 +662,9 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down"); location = CGPointMake(CGRectGetMinX(contentRect) - standardLeftMargin, 0.0); minimumWidth += standardLeftMargin; + + // To ensure the selected item is highlighted correctly, unset the highlighted item + [menu _highlightItemAtIndex:CPNotFound]; } [menu setMinimumWidth:minimumWidth];