Skip to content

Subtle scrolling bug in List when the last two items are of different size #5281

Closed
@hkparker

Description

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

When using a list and attempting to scroll to the bottom, if the last item has a custom height that is larger than the previous item, the list doesn't scroll all the way down.

I think what's going on here is an assumption on this line that lastItemHeight, which is intended as a reference to the current item's height, is wrong. It is an accurate reference to the height of the item above the item in question, but we can't assume that the item in question is the same size.

How to reproduce

Set a custom height on the last item and scroll to bottom

Screenshots

No response

Example code

I don't have an example application for this one but could create one if really desired. Opening this since it came up in a conversation with @andydotxyz and I wanted to leave a note somewhere. Probably could be added as a test case and surfaced there.

Fyne version

2.5.2

Go compiler version

go1.22.5 linux/amd64

Operating system and version

Arch Linux

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions