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

Selection on double click selects too much on Windows

    XMLWordPrintable

Details

    Description

      This is probably related to RT-16628. Take this example:
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.TextArea;
      import javafx.stage.Stage;

      public class TextAreaReadOnly extends Application {

      public TextAreaReadOnly() {
      }

      @Override
      public void start(Stage primaryStage) throws Exception {
      TextArea textarea = new TextArea();
      textarea.setText("| Apples | Oranges |");
      textarea.setEditable(false);

      Scene scene = new Scene(textarea, 600, 400);
      primaryStage.setScene(scene);
      primaryStage.show();
      }

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

      If you run it (on Windows) and double click on Apples, it will select Apples, the following space, the pipe sign and the space after the pipe-sign. It should stop right after the first space. This at least is what input fields, notepad and wordpad do under Windows

      Attachments

        Activity

          People

            leifs Leif Samuelsson (Inactive)
            rlichtenbjfx Robert Lichtenberger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: