8066142: Edit the value in the text field and then press the tab key, the number don't increase
authoralexsch
Wed, 03 Dec 2014 14:25:49 +0300
changeset 28082 25a509d90496
parent 28081 b20407c53c23
child 28083 91a04df877cc
8066142: Edit the value in the text field and then press the tab key, the number don't increase Reviewed-by: serb, azvegint
jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Tue Dec 02 12:48:49 2014 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Wed Dec 03 14:25:49 2014 +0300
@@ -1320,8 +1320,8 @@
      */
     public void actionPerformed(ActionEvent e) {
         ComboBoxEditor editor = getEditor();
-        if ((editor != null) && (e != null)
-                && (editor.getEditorComponent() == e.getSource())) {
+        if ((editor != null) && (e != null) && (editor == e.getSource()
+                || editor.getEditorComponent() == e.getSource())) {
             setPopupVisible(false);
             getModel().setSelectedItem(editor.getItem());
             String oldCommand = getActionCommand();