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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u9
    • javafx
    • Windows 7 x64, jdk-7u9-windows-i586

      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.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: