Skip to content

feat: auto scroll when the focused item is out of viewBound#2

Open
thedroiddiv wants to merge 1 commit into
mainfrom
auto-scroll-on-keyboard-input
Open

feat: auto scroll when the focused item is out of viewBound#2
thedroiddiv wants to merge 1 commit into
mainfrom
auto-scroll-on-keyboard-input

Conversation

@thedroiddiv

Copy link
Copy Markdown
Owner

Description

This PR introduces auto scroll feature when being navigated using keyboard and the focused item is out of viewBound.

2025-08-15.16-49-07.mov

Existing issues:

When the list is scrolled automatically, mouse hover event is triggered which in-turn calls onItemHover forcing the focus to move item under pointer.

This might be actually be an issue in the compose API itself, ideally PointerEvent.Move should be triggered when pointer is moved physically through a pointing device rather than on movement of the content below mouse.

@thedroiddiv

Copy link
Copy Markdown
Owner Author

I tested the behaviour by adding onPointerEvent(PointerEvent.Move) { /* log mouse move */ }

Log is getting printed even though mouse is not move physically but the list under mouse scrolls.

@thedroiddiv thedroiddiv force-pushed the auto-scroll-on-keyboard-input branch from 97692b6 to 1f21f1f Compare August 15, 2025 11:34
auto scroll when keyboard navigation moves focus to an item that is out of view
@thedroiddiv thedroiddiv force-pushed the auto-scroll-on-keyboard-input branch 2 times, most recently from c160a55 to 4def629 Compare August 15, 2025 14:51
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

Successfully merging this pull request may close these issues.

1 participant