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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jgiles Jonathan Giles
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Imported: