JDK-8125906 : [TextField] Text input starts from wrong position.
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-10-04
  • Updated: 2015-06-17
  • Resolved: 2012-10-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
Relates :  
Description
To reproduce:

When app is opened and text field get focus - all the text is selected.
1. Click with mouse after the last character.
2. Type any letter.
3. The letter appears before the last character!


import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;

public class TextFieldCaretPos extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
   public void start(Stage stage) throws Exception {
        HBox root = new HBox();
        
        TextField textField = new TextField("Simple tet");
        root.getChildren().add(textField);
        
        Scene scene = new Scene(root, 300, 200);
        stage.setScene(scene);;
        stage.show();
    }
}
Comments
verified fx8.0 b60
15-10-2012

Changeset: http://hg.openjdk.java.net/openjfx/8/controls/rt/rev/c0aff81b30ad The fix was to disable the use of caret bias handling in TextField. This will be enabled again when all the insertion, selection, and navigation functionality is caret bias aware in a bidi context. See also evaluation for RT-24876 which caused this regression.
09-10-2012

This is happening when the caret is placed anywhere using the mouse, but not when moved with the keyboard.
04-10-2012

If you try to select all text using mouse everything will be selected except the last character.
04-10-2012