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

TextInputControl: next word navigation irregularities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx21
    • javafx
    • None
    • Cause Known

      [Next word] navigation in TextInputControl (TextArea, TextField; PasswordField is unaffected) exhibits the following problems:

      On macOS, the "next word" key mapping (option-RIGHT) navigates to the end of the current word (if in the middle of the word), or to the end of the next word.

      1. does not skip over multiple periods:
      "aaa.... bbbb" -> "aaa⏐.⏐.⏐.⏐.⏐ bbbb⏐"
      (where '⏐' indicates the next word caret stop position)

      2. unexpectedly stops at the beginning of the Bhojpuri word (Bhojpuri is interesting because not only it is represented by surrogate pairs, but also has grapheme clusters):
      "Bhojpuri \ud804\udca6\ud804\udcb7\ud804\udc94\ud804\udca3\ud804\udcb3\ud804\udca9\ud804\udcb2 test"
      "Bhojpuri 𑂦𑂷𑂔𑂣𑂳𑂩𑂲 test" -> "Bhojpuri⏐ ⏐𑂦𑂷𑂔𑂣𑂳𑂩𑂲⏐ test⏐"

      3. using the Monkey Tester, TextArea page set to Text -> Writing Systems, the next word sometimes stops in the middle of some names, the behavior different from Chrome, for example:
      Bagheli: बघेली
      Bagri: बागड़ी
      Bengali: বাংলা
      Braille: ⠃⠗⠇ (however, Chrome also stops in the middle of the Braille sequence)
      Bundeli: बुन्देली
      Chhattisgarhi: छत्तीसगढ़ी, ଛତିଶଗଡ଼ି, ଲରିଆ
      etc.

      On Windows, the "next word" key mapping (ctrl-RIGHT) is supposed to navigate to the *beginning* of the next word.

      TBD


      Related, the [delete next word] function (fn-option-delete key on mac) works incorrectly with Chhattisgarhi, leaving dangling combining characters.

      The root cause is likely to be the same as in JDK-8330590, improper use of Character.isLetterOrDigit(char) instead of Character.isLetterOrDigit(int).

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: