Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8125906

[TextField] Text input starts from wrong position.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • javafx
    • jdk 1.8.0-ea-b58

    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();
          }
      }

      Attachments

        Issue Links

          Activity

            People

              leifs Leif Samuelsson (Inactive)
              dzinkevi Dmitry Zinkevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: