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

In TextArea caret disappears if moved by arrows to the first position after unfocus and focus again

XMLWordPrintable

    • generic
    • generic

      FULL PRODUCT VERSION :
      java version "1.8.0_101"
      Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.14393]

      A DESCRIPTION OF THE PROBLEM :
      In TextArea caret disappears if moved by arrows to the first position after unfocus and focus again.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Put some text into TextArea
      2. Click any other control in order to remove focus from TextArea
      3. Click on the TextArea to gain focus again.
      4. By using left arrow key navigate to the beginning of the TextArea

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The caret disappears. Pressing right arrow and left again makes it visible again.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.TextArea;
      import javafx.scene.layout.StackPane;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class TextAreaTest extends Application {
          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("Hello World!");

              VBox vbox = new VBox(10);

              Button info = new Button("Button");

              TextArea text = new TextArea();


              vbox.getChildren().addAll(info, text);

              StackPane root = new StackPane();
              root.getChildren().add(vbox);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }
      }
      ---------- END SOURCE ----------

            pmangal Priyanka Mangal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: