Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next focus key prediction on arrow press #152

Open
a-roz opened this issue Nov 14, 2024 · 0 comments
Open

Next focus key prediction on arrow press #152

a-roz opened this issue Nov 14, 2024 · 0 comments

Comments

@a-roz
Copy link

a-roz commented Nov 14, 2024

Is any possibility to get next sibling's focus key after press arrow button, but not perform this arrow action ?

Have faced this in realizing smooth ScrollView with active focusable elements inside.
I have a long text with a quite few active controls , and a client should have ability to read FULL text between focusable controls. Standard approach is not good as it changes scroll position to make focused element visible in Viewport, ignoring long not focusable content in-between focusable controls.

The idea is:

  1. On arrow event make predication on desired direction (up/down/left right) ( get next element focusKey and FocusableComponentLayout ), but not performing arrow action mentioned

  2. If next closest focusable element completely stay in Viewport, have to focus on it manually.

  3. Else cases - have to scroll content to fixed distance, i.e. 200 px till next active focusable element appears completely in the view port.

Probably it is a wrong approach, any ideas welcome

UPD: related to #117 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant