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

positionCaret(), end() and selectAll() on an TextField of a table cell factory doesn't work

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u9
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Windows 7 x64, jdk-7u9-windows-i586

      Description

      I just found out that these methods only work when you run them after you requestFocus() on the TextField inside the Platform.runLater() method. So I tried to do the same inside the startEdit() method of my table cell factory which extends from TableCell but it doesn't seem to work. I enter the edit mode by calling edit() on the TableView.

      Here is the code: http://pastebin.com/V6w4mDwd

      Also, if you check this JavaFX example http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html#SAMPLES/Controls/Table/Table%20Cell%20Factory there's a call to selectAll() inside the startEdit() method which also doesn't work. The caret gets positioned at the character you click on when you want to edit.

      The behaviour of these methods should be clarified or fixed.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: