[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    [jfx20] Integrated: 8300013: Node.focusWithin doesn't account for nested focused nodes
From:       Michael =?UTF-8?B?U3RyYXXDnw==?= <mstrauss () openjdk ! org>
Date:       2023-01-31 17:14:22
Message-ID: nq7zXoIrgcsuTEVycae6OhbguVjp4Y4yhzu9Ec2SS24=.9141cea9-7074-4aab-b1b3-11ad09454fde () github ! com
[Download RAW message or body]

On Thu, 12 Jan 2023 03:08:30 GMT, Michael Strauß <mstrauss@openjdk.org> wrote:

> When a scene graph contains multiple nested focused nodes (this can happen with \
> `TableView` and other controls), the `focusWithin` bits that are cleared when a \
> focused node is de-focused must only be cleared when there is no other nested node \
> in the scene graph that would also cause `focusWithin` to be set. 
> For example, consider a scene graph of nested nodes:
> A -> B -> C -> D
> 
> When B and D are both focused, the scene graph looks like this:
> A(`focusWithin`)
> -> B(`focused`, `focusWithin`)
> -> C(`focusWithin`)
> -> D(`focused`, `focusWithin`)
> 
> When B is de-focused, the `focusWithin` flags must still be preserved because D \
> remains focused. 
> This PR fixes the issue by counting the number of times `focusWithin` has been \
> "set", and only clears it when it has been "un-set" an equal number of times.

This pull request has now been integrated.

Changeset: a4bc9d1a
Author:    Michael Strauß <mstrauss@openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/a4bc9d1a69e56cab92d3dc34cfff49c5cb524443
                
Stats:     89 lines in 2 files changed: 73 ins; 0 del; 16 mod

8300013: Node.focusWithin doesn't account for nested focused nodes

Reviewed-by: aghaisas, kcr

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic