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

TextArea: Caret is positioned in wrong line when using backspace

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8, 9
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      A DESCRIPTION OF THE PROBLEM :
      Use a TextArea an enter

      Hello this
      is a
      test

      Then place the cursor behind "a" and press backspace four times so that the text looks like this:

      Hello this

      test

      The problem is now that the caret is displayed behind the "Hello this" instead of in the empty line. And when you press a key the character is displayed at the correct position, i.e. in the empty line, not where the caret is. So the only problem is that the caret is displayed at the wrong position. Typing works correctly. I.e. if you don't look at the screen everything works correctly. The only problem is that the caret is displayed at the end of the first line instead of the start of the second line in this example.

      REGRESSION : Last worked in version 8u221

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use a TextArea an enter

      Hello this
      is a
      test

      Then place the cursor behind "a" and press backspace four times so that the text looks like this:

      Hello this

      test

      The problem is now that the caret is displayed behind the "Hello this" instead of in the empty line.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The caret should be displayed in the second line, the empty line. Because backspace was pressed only four times and there were four characters.
      ACTUAL -
      The caret is displayed at the end of the first line instead.

      ---------- BEGIN SOURCE ----------
      Just use a TextArea. You can even use the preview mode of the Scene Builder to reproduce the problem.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I haven't found a workaround yet.

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: