This PR fixes a bug where multi-level focus is not correctly preserved.
The original implementation incorrectly assumed that there can only be a single 
focused node in the scene graph, which is not the case when a branch of the 
scene graph is presented by a `PopupWindow`. More specifically, when a focused 
node was removed from the scene graph, the focus flags of all parents were 
incorrectly cleared. The correct implementation only clears the `focusWithin` 
flag of parents (but not `focused` or `focusVisible`), and stops when another 
focused node is encountered along the way.

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

Commit messages:
 - Preserve multi-level focusWithin
 - Failing test

Changes: https://git.openjdk.org/jfx/pull/956/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=956&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8297130
  Stats: 69 lines in 2 files changed: 57 ins; 3 del; 9 mod
  Patch: https://git.openjdk.org/jfx/pull/956.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/956/head:pull/956

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

Reply via email to