mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Add workaround for item scrolling issue
This commit is contained in:
parent
a26793cd65
commit
ac6342ff8d
@ -190,7 +190,12 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
if (SelectedItem.Value == null || !ItemMap.TryGetValue(SelectedItem.Value, out var drawableItem))
|
||||
return;
|
||||
|
||||
ScrollContainer.ScrollIntoView(drawableItem);
|
||||
// ScrollIntoView does not handle non-loaded items appropriately, delay scroll until the item finishes loading.
|
||||
// see: https://github.com/ppy/osu-framework/issues/5158
|
||||
if (!drawableItem.IsLoaded)
|
||||
drawableItem.OnLoadComplete += _ => ScrollContainer.ScrollIntoView(drawableItem);
|
||||
else
|
||||
ScrollContainer.ScrollIntoView(drawableItem);
|
||||
}
|
||||
|
||||
#region Key selection logic (shared with BeatmapCarousel and RoomsContainer)
|
||||
|
Loading…
Reference in New Issue
Block a user