RFR: 8340852: ScrollPane should not consume navigation keys when it doesn't have direct focus

Andy Goryachev angorya at openjdk.org
Thu Oct 3 16:35:43 UTC 2024


On Thu, 3 Oct 2024 13:26:38 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

> or perhaps indeed something with traversal policies would need to be created by the user to solve this on a case by case basis. It will be hard to always do the expected thing with a control as generic as ScrollPane.

I played with your examples and this PR a bit more.  I am now convinced you are right and we should fix the ScrollPane as you proposed (with a minor suggestion).

On the traversal subject, the keyboard navigation in FX is sometimes weird, which further confirms the need for a public traversal APIs (#1555).  For example, arrow down unexpectedly navigates away from the scroll pane content into the side panel (with or without this PR):

![Screenshot 2024-10-03 at 09 30 13](https://github.com/user-attachments/assets/b0f52927-5e3e-470b-a92f-9f3de0e12c9e)

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

PR Comment: https://git.openjdk.org/jfx/pull/1582#issuecomment-2391848364


More information about the openjfx-dev mailing list