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

Fix table scroll reset #5542

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

NicolasPerrenoud
Copy link
Contributor

Description:

As described in #5538, the first time the user clicks on a cell the table scroll to the to. This is because the focus is still initialized to (0, 0). I change the behaviour of the focus. Now when the user click on a cell, the focus is set on this cell. This is more user friendly because now when the user uses the arrow to change the focus, it starts from the selected cell

There is a second issue that can reset the scroll. When the user click between two cells, the function columnAt return an negative index. Because of this the table tries to scroll to this negative index. This was also the bug reported in #4917

Fixes #5538
Fixes #4917

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@coveralls
Copy link

Coverage Status

coverage: 62.318% (+0.005%) from 62.313%
when pulling f3c768f on NicolasPerrenoud:fix_table_scroll_reset
into 9b4e31f on fyne-io:develop.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@andydotxyz andydotxyz merged commit cbb0fd3 into fyne-io:develop Feb 26, 2025
11 checks passed
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.

3 participants