On Sun, 3 May 2026 20:21:11 GMT, Marius Hanl <[email protected]> wrote:

> Fixes that the `TabObservableList` creates wrong `permutation` change events. 
> As they are wrong, listeners that rely on the change events like 
> `FilteredList` will get confused and do the wrong things.
> 
> I was wondering why the `TabPaneSkin` was not affected, as it installs a 
> listener on the tabs.
> Turns out this is because the code path is not triggered when the tabs are 
> reordered by dragging as can be seen here:
> 
> https://github.com/openjdk/jfx/blob/697a534bf494d82bf8e0ecacfebaba003dcc6c7a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java#L606-L609
> 
> So this issue is rather rare and limited to listeners installed by the 
> developer (and interested in permutation events).
> Or using a `FilteredList` with the tabs, which will install such a listener 
> as well.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Marked as reviewed by mstrauss (Reviewer).

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

PR Review: https://git.openjdk.org/jfx/pull/2164#pullrequestreview-4350347824

Reply via email to