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

SelectionModel.getSelectedItem() API does not work correctly in case when multiple selection is enabled and Shift key is down

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • fx2.1, 7u6
    • javafx
    • Windows

    Description

      As per documentation of getSelectedItem:
      Returns the currently selected object (which resides in the selected index position). If there are multiple items selected, this will return the object contained at the index returned by getSelectedIndex() (which is always the index to the most recently selected item).
      But it is not happening in case when Shift key is down.
      Steps to reproduce:
      1. Run the attached application.
      2. Click on the 'OpenTable' button on the main stage to open a table view.
      3. Click on the last entry (Michael Brown)
      4. Holding the Shift key down, click on the second last entry (Emma Jones)
      5. The application log shows Michael as the last person selected instead of Emma.

      It works correctly if Ctrl key is down

      Attachments

        Issue Links

          Activity

            People

              jgiles Jonathan Giles
              abrarjfx Arvinder S Brar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: