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

Compose SemanticsAutoScrollProviderImpl doesn't work in LazyColumn #696

Open
tprochazka opened this issue Jan 7, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@tprochazka
Copy link

SemanticsAutoScrollProviderImpl works by trying to find the expected element by matcher and scrolling to it.
But LayzColumn works in a way that there is no element outside the visible screen.
You need to scroll there to have it.

So SemanticsAutoScrollProviderImpl should instead do something like this:

 val list = child<KNode> {
     addSemanticsMatcher(SemanticsMatcher.keyIsDefined(SemanticsProperties.VerticalScrollAxisRange))
 }
 list.assertExists()
 list.performScrollToNode(matcher)

Where matcher is the original element that we want to find.

@tprochazka tprochazka added the bug Something isn't working label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant