RFR: 8129123: ComboBox popup list view does not scrollTo when ComboBox value/selection is set

Craig Cavanaugh github.com+636962+ccavanaugh at openjdk.java.net
Sun Apr 19 10:40:14 UTC 2020


On Fri, 17 Apr 2020 10:42:30 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

> repeating my comment from the [previous pull request](https://github.com/openjdk/jfx/pull/136#issuecomment-608401086):
> I don't think this is yet ready for a technical review - there are some more basic questions that are not yet answered
> :)

> - is it really a bug or a nice-to-have enhancement? couldn't find an example in win, didn't try too hard and nowadays,
>   such plain combos are not a really frequent
>  - while none of the virtualized controls (nor ChoiceBox) combines selection with scrolling to the selected item. For
>    combo and choice, I see no reason not make it the default behavior. We need to make certain it behaves "naturally" when
>    navigating in the open popup.
>  - instead of catching every list.select (and not forget the unselect) we might consider doing it in a showing handler
>  - alternatively, we might consider to go deeper and support it directly in the listView

- For me / my users / and the open bug, it is a bug due to the current behavior being unexpected.  It creates the
  illusion of a preselected value not actually being selected because it's not visible if the list is large and has been
  shown.  It creates doubt and the user has to scroll to reconfirm their selection which takes extra unnecessary effort
  and time.

- With my testing, for the ComboBox, behavior was smooth and natural.  I've not made any attempt to change selection with
  it shown and I'm not certain it can happen unless done programmatically.  User selection within the list requires
  scrolling, so the selected value is already visible.

- I'm not opposed to taking this approach.  My current work around by extending ComboBox is based on scrolling when the
  value is set (restored) programmatically.  I could see how it may be more efficient if multiple selections were being
  performed programmatically, but not sure why someone would write code this way.  I would think it's a one shot process
  to select the final value.

- Implementing the change in ListView would not change/improve ChoiceBox simply because it does not use an underlying
  ListView.   My search on uses of ListView only reviled ComboBox other than itself.  Since ListView by itself is not
  collapsed/hidden for typical uses, would automatic scrolling within ListView create a confusing experience?

-------------

PR: https://git.openjdk.java.net/jfx/pull/166


More information about the openjfx-dev mailing list