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

Double clicking a word in TextArea selects wrong word

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • jfx11, 8, jfx15, jfx16, jfx17
    • javafx
    • x86_64
    • windows_10

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows 10.
      Java 11 (Code seems to be buggy until now)

      A DESCRIPTION OF THE PROBLEM :
      Double clicking on a word in a TextArea should select the word. If you have a Word like "AAA.3X3" and you double click on the "X", "AAA" is selected.

      From the code this is OS dependant (using Mircrosoft). The code is still wrong in the current version.

      The bug is the mismatch of word recognition in TextInputControl.previousWord(boolean) which checks only for !Character.isLetterOrDigit and TextInputControl.nextWord(boolean) which checks only for ' ' and '\t'.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      * Insert "AAA.3X3" into a TextArea
      * Double click on the "X" between the 3s



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "3X3" or "AAA.3X3" should be selected
      ACTUAL -
      "AAA" is selected

      CUSTOMER SUBMITTED WORKAROUND :
      You can select with Shift/Ctrl and arrow keys or dragging pressed mouse.

        1. TextAreaApp.java
          0.6 kB
          Praveen Narayanaswamy

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: