8066142: Edit the value in the text field and then press the tab key, the number don't increase
Reviewed-by: serb, azvegint
--- 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();