probably introduced by fixing RT-25679
As already noted in that issue, I disagree with both generality of the requirement and fix :-)
- it's breaking behaviour big style
- the requirement is not general enough to warrant a default: if applications need to select on focused, it's easy enough to in install custom listeners that force a selection
- often, selection is bound to some action (like loading data from the backend) that might be costly to perform, doing so without need detoriates user experience
- there's no way to keep the list unselected (which is a perfectly valid state) (except hacking: set the clientProperty "selectOnFocusGain" to Boolean.FALSE for ListView, nothing available for TableView, afaics)
My suggestion:
- revert to not break behaviour
- if you really want to support it, support some per-instance/per-application configuration with not-auto-selecing on focusGained being the default. Something seems to be in-place already, there's an entry "selectOnFocusGain" in listView's properties map (sinceRT-36651 or RT-35679, can't see the latter - wondering why not?)
it's a regression because it worked as expected (no auto-select) in 8u5
As already noted in that issue, I disagree with both generality of the requirement and fix :-)
- it's breaking behaviour big style
- the requirement is not general enough to warrant a default: if applications need to select on focused, it's easy enough to in install custom listeners that force a selection
- often, selection is bound to some action (like loading data from the backend) that might be costly to perform, doing so without need detoriates user experience
- there's no way to keep the list unselected (which is a perfectly valid state) (except hacking: set the clientProperty "selectOnFocusGain" to Boolean.FALSE for ListView, nothing available for TableView, afaics)
My suggestion:
- revert to not break behaviour
- if you really want to support it, support some per-instance/per-application configuration with not-auto-selecing on focusGained being the default. Something seems to be in-place already, there's an entry "selectOnFocusGain" in listView's properties map (since
it's a regression because it worked as expected (no auto-select) in 8u5
- relates to
-
JDK-8092710 Cannot select root node at opening time from the Hierarchy
- Resolved
-
JDK-8095559 [ListView] Setting the items of a ListView fires selection event
- Closed