On Tue, 29 Mar 2022 09:23:24 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:

> Have you considered keeping the same while loop in findSibling() method and 
> skipping invisible Menus in it? This is to avoid creating and traversing a 
> new list.

This would not give the correct result. findSibling must return the index in 
the list of **visible** menus, since this is what setFocusedMenuIndex() really 
expects. If we only skip invisible menus we will possibly return an index that 
is out of bounds, which is exactly what this bug is about.

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

PR: https://git.openjdk.java.net/jfx/pull/759

Reply via email to