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

The cursor is not shown in TextField when text is selected

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 20.04.6 LTS
      openjdk version "23" 2024-09-17

      A DESCRIPTION OF THE PROBLEM :
      The cursor is not shown in TextField when text is selected. At the same time they say that in Windows cursor is shown.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the provided code in Ubuntu. Select the text. When text is selected the cursor won't be visible. Try in Windows.


      ---------- BEGIN SOURCE ----------
      public class NewMain1 extends Application {

          @Override
          public void start(Stage primaryStage) {
              var badTextField = new TextField("Some text");
              VBox root = new VBox(badTextField);
              root.setPadding(new Insets(15));
              Scene scene = new Scene(root, 300, 100);
              primaryStage.setScene(scene);
              primaryStage.show();
          }

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

        1. Ubuntu22-cursor.png
          Ubuntu22-cursor.png
          5 kB
        2. Ubuntu22.png
          Ubuntu22.png
          4 kB
        3. Test.java
          0.6 kB

            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: