Skip to content

scrollable: Ignores requested scroll position durring display region change event frame #93

@Rosuavio

Description

@Rosuavio

Given

  1. A scrollable with scrollPosition of ScrollPos_Bottom
  2. During the event frame of the display region changing

When

A scroll position is that is requested for the scrollable via scrollTo (and probably also scrollBy) that is

  1. within view given the "current" scrollPosition (ScrollPos_Bottom) and scrollHeight
  2. outside of the view given the updated height

Result

The scrollable maintains the scrollPosition of ScrollPos_Bottom, effectively ignoring the requested scrollPosition.

Expected

My expectation is that the scrollable would update to the requested scrollPosition, given that position would be outside of the view from the ScollPos_Bottom position, using the "totalLines" and "scrollHight" of the new event frame.

Context

I am building a way to select a line from a list, by having the list displayed in a scrollable and having it scroll when the user moves the selection past the ends of the scrollable.

But, to maintain that the currently selected item stays displayed, I need to scroll the scrollable to a appropriate position when the height of the scrollable changes, as the selected item can get cut from view when the scrollable shrinks. So, therefor I am pushed to move the scrollable in the same event frame as the height changing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions