changeset 1448:b9a7024c3450

RT-23275: Editable combobox throws StackOverflowError when press ESC key
author jgiles
date Tue, 10 Jul 2012 08:32:01 +1200
parents 2e3e8a90f8c0
children 58bea6c6decc
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Mon Jul 09 16:49:39 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Tue Jul 10 08:32:01 2012 +1200
@@ -147,6 +147,14 @@
                         else comboBox.show();
                         t.consume();
                         return;
+                    } else if (ke.getCode() == KeyCode.F10 || ke.getCode() == KeyCode.ESCAPE) {
+                        // RT-23275: The TextField fires F10 and ESCAPE key events
+                        // up to the parent, which are then fired back at the 
+                        // TextField, and this ends up in an infinite loop until
+                        // the stack overflows. So, here we consume these two
+                        // events and stop them from going any further.
+                        t.consume();
+                        return;
                     }
                 }