mirror of
https://github.com/ppy/osu.git
synced 2026-06-09 07:33:39 +08:00
Kill focus from components when clicking on an empty space in the panel
This commit is contained in:
@@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Height = header_height,
|
||||
Expanded = { BindTarget = Expanded },
|
||||
},
|
||||
content = new InputBlockingContainer
|
||||
content = new FocusGrabbingContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
BorderColour = colourProvider.Dark3,
|
||||
@@ -159,5 +159,11 @@ namespace osu.Game.Overlays.Mods
|
||||
base.Update();
|
||||
scrollContainer.Height = Math.Min(scrollContainer.AvailableContent, DrawHeight - header_height);
|
||||
}
|
||||
|
||||
private partial class FocusGrabbingContainer : InputBlockingContainer
|
||||
{
|
||||
public override bool RequestsFocus => true;
|
||||
public override bool AcceptsFocus => true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user