changeset 3833:2f5985406164

RT-28346: TextArea - Pressing ENTER/RETURN does not move cursor to new line
author leifs
date Sat, 01 Jun 2013 17:39:22 -0700
parents 3450a1dac4a9
children b7cc945d9169
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Fri May 31 17:15:40 2013 -0400
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Sat Jun 01 17:39:22 2013 -0700
@@ -418,6 +418,9 @@
         caretPosition.addListener(new ChangeListener<Number>() {
             @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                 targetCaretX = -1;
+                if (newValue.intValue() > oldValue.intValue()) {
+                    setForwardBias(true);
+                }
             }
         });