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

[TextField] Text input starts from wrong position.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      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

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: