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

[TreeView, TreeTableView] Focus jumps to TreeItem sibling when child TreeItem is removed.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • None

      Test cases developed, but are currently @Ignored until a fix can be developed.

      The two tests are:
      javafx.scene.control.TreeViewTest.test_rt28114()
      javafx.scene.control.TreeTableViewTest.test_rt28114()

      Two related issues:

      Issue 1: Steps to reproduce:
      1) Open HelloTreeView
      2) Click "Add child to Child Node 2" button multiple times
      3) Expand "Child node 2"
      4) Select the _last_ child of "Child node 2"
      5) Click "Remove child from Child Node 2"
      6) BUG: Selection has moved correctly, but focus has disappeared (most probably because both selection and focus models update focus)

      Issue 2: Steps to reproduce:
      1) Open HelloTreeView
      2) Click "Add child to Child Node 2" button multiple times
      3) Expand "Child node 2"
      4) Select the _second to last_ child of "Child node 2"
      5) Click "Remove child from Child Node 2"
      6) BUG: Selection has moved correctly, but focus has moved up one row unexpectedly (most probably because both selection and focus models update focus)

      As noted, in both cases the bug is likely due to the fact that both selection model and focus model listen to these events and update the focus independently.

            Unassigned Unassigned
            jgiles Jonathan Giles
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: