I feel this is going in a wrong direction: the root cause of the issues we are 
observing, in my opinion, is that the top-level Control is fighting for control 
with the inner control, and the inner control's behaves as if it is a top-level 
control.

What should happen instead is to provide a way for the top-level Control to 
disable those aspects of the inner control behavior (event handlers, key 
bindings) that are not needed anymore, and replace them with the new logic.
Continuing the Spinner example, it is ok for the TextField (Spinner.editor) to 
receive events, but the handling of certain key combinations should be disabled 
and instead bubbled up to the Spinner behavior.

I propose to use the InputMap 
https://github.com/andy-goryachev-oracle/Test/blob/main/doc/InputMap/InputMapV3.md
 for this purpose.

-andy


From: openjfx-dev <openjfx-dev-r...@openjdk.org> on behalf of Michael Strauß 
<michaelstr...@gmail.com>
Date: Friday, November 8, 2024 at 17:35
To: openjfx-dev <openjfx-dev@openjdk.org>
Subject: Focus delegation API
Hi everyone,

here is a proposal to finally solve the focus delegation problem that
has recently been discussed in the "Prioritized event handlers"
thread.

Proposal: https://gist.github.com/mstr2/44d94f0bd5b5c030e26a47103063aa29
Draft PR: https://github.com/openjdk/jfx/pull/1632

Reply via email to