On Wed, 9 Sep 2026 12:46:17 GMT, Marius Hanl <[email protected]> wrote:

> This fixes a asymmetry in `ControlAcceleratorSupport` that causes a bug and 
> also a test to fail (an existing `Disabled` test).
> 
> All `addAcceleratorsIntoScene` will register a listener on the 
> `anchor.sceneProperty()`.
> The anchor is:
> - The `Node`
> - The `TabPane` for a `Tab`
> - The `Tree/TableView` for a `TableColumnBase`
> 
> Until this PR, the `removeAcceleratorsFromScene` sequence was sometimes 
> inconsistent:
> - For `Node`: 
>   - Unregister the `sceneProperty` on `Node`
>     - Then remove the accelerators from `Scene`
> - For `Tab` -> Get `TabPane`
>   - Then remove the accelerators from `Scene`
> - For `TableColumnBase` -> Get `Tree/TableView`
>   - Then remove the accelerators from `Scene`
> 
> Note how the "Unregister the `sceneProperty` on `Node`" step is completely 
> missing for `Tab` and `TableColumnBase`, explaining the bug and failing test 
> for only those two cases.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

it's the right fix.

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

Marked as reviewed by angorya (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/2306#pullrequestreview-5199698652

Reply via email to