osu-framework
osu-framework copied to clipboard
`ScrollContainer.ScrollIntoView` does not handle non-loaded drawable targets
Raised in https://github.com/ppy/osu/pull/18090#issuecomment-1117218050 with brief explanation and discussion in https://github.com/ppy/osu/pull/18090#issuecomment-1118136311.
In summary, ScrollContainer cannot compute the bounds of a non-loaded target, as it doesn't have a parent yet to inherit from its DrawInfo (even then, it needs to be laid out in the flow properly before it can be scrolled to).
This could be solved by scheduling the operation to happen after the drawable is loaded as in https://github.com/ppy/osu/pull/18090#issuecomment-1118186680, but a better approach may be to store the next target to a field until the operation can be achieved, as mentioned in https://github.com/ppy/osu/pull/18090#issuecomment-1118193621.