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`" (in this case on 
> `TabPane`, and on `TableColumnBase`) step is completely missing for `Tab` and 
> `TableColumnBase`, explaining the bug and failing test for only those cases.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This looks good to me.

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

Marked as reviewed by aghaisas (Reviewer).

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

Reply via email to