> The bug occurs when `showRoot` is set to false on a root with no children, 
> the expanded item count drops is 0 causing `isFocused(0)` to return false 
> even though `focusedIndex` is still 0. When items are added afterwards the 
> `treeItemListener` sees `focusedIndex=0` and incorrectly shifts it to 1 
> placing the focus on second item of the TreeView.
> The fix replaces `isFocused(0)` with `getFocusedIndex() >= 0`, which reads 
> the raw stored index.

Ziad El Midaoui has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains five additional 
commits since the last revision:

 - Merge branch 'openjdk:master' into 8256142.TreeViewFocus
 - minor changes
 - Added Test
 - Merge branch 'openjdk:master' into 8256142.TreeViewFocus
 - Fixed focus on second item in TreeView

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/2095/files
  - new: https://git.openjdk.org/jfx/pull/2095/files/50d20691..b4c24392

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=2095&range=03
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2095&range=02-03

  Stats: 3692 lines in 42 files changed: 1816 ins; 647 del; 1229 mod
  Patch: https://git.openjdk.org/jfx/pull/2095.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2095/head:pull/2095

PR: https://git.openjdk.org/jfx/pull/2095

Reply via email to