mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Add workaround for item scrolling issue
This commit is contained in:
@ -190,7 +190,12 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
if (SelectedItem.Value == null || !ItemMap.TryGetValue(SelectedItem.Value, out var drawableItem))
|
if (SelectedItem.Value == null || !ItemMap.TryGetValue(SelectedItem.Value, out var drawableItem))
|
||||||
return;
|
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)
|
#region Key selection logic (shared with BeatmapCarousel and RoomsContainer)
|
||||||
|
Reference in New Issue
Block a user