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

ListView incorrectly shifts selection when deleting items.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 9
    • 8u25
    • javafx

      Start HelloListView, select item 2, press shift, select item 7:
      SelectedIndex: 1
      SelectedIndices: [1], removed: [], addedFrom: 0, addedTo: 1
      SelectedIndex: 5
      SelectedIndices: [1, 2, 3, 4, 5], removed: [], addedFrom: 1, addedTo: 5
      Press Delete 0th row.
      Only 4 selected items remains, item 2 gets unselected.
      SelectedIndex: 4
      SelectedIndices: [1, 2, 3, 4], removed: [], addedFrom: 0, addedTo: 5

      Now if the order of the selected items is reversed, that is:
      Select item 7, then shift-select item 2:
      SelectedIndex: 5
      SelectedIndices: [5], removed: [], addedFrom: 0, addedTo: 1
      SelectedIndex: 1
      SelectedIndices: [1, 2, 3, 4, 5], removed: [], addedFrom: 0, addedTo: 4
      And then press Delete 0th row, the selection shifts correctly:
      SelectedIndex: 0
      SelectedIndices: [0, 1, 2, 3, 4], removed: [], addedFrom: 0, addedTo: 5

            jgiles Jonathan Giles
            vadim Vadim Pakhnushev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: