ListView incorrectly shifts selection when deleting items.

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • 9
    • Affects Version/s: 8u25
    • Component/s: 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

            Assignee:
            Jonathan Giles
            Reporter:
            Vadim Pakhnushev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: