--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java Wed Nov 19 14:12:59 2014 +0400
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java Wed Nov 19 16:42:19 2014 +0400
@@ -496,10 +496,15 @@
// This is somewhat messy. The difference here from BasicComboBoxUI.EnterAction is that
// arrow up or down does not automatically select the
@SuppressWarnings("serial") // anonymous class
- private static final Action triggerSelectionAction = new AbstractAction() {
+ private final Action triggerSelectionAction = new AbstractAction() {
public void actionPerformed(final ActionEvent e) {
triggerSelectionEvent((JComboBox)e.getSource(), e);
}
+
+ @Override
+ public boolean isEnabled() {
+ return comboBox.isPopupVisible() && super.isEnabled();
+ }
};
@SuppressWarnings("serial") // anonymous class