1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 01:00:27 +08:00

Only grab focus if nothing else has it

This commit is contained in:
Drew DeVault
2017-01-30 14:03:05 -05:00
Unverified
parent 144a87a247
commit 8d294a4eca
+7 -1
View File
@@ -68,7 +68,13 @@ namespace osu.Game.Screens.Select
protected override void Update()
{
if (GrabFocus && !HasFocus && IsVisible)
TriggerFocus();
{
var inputManager = Parent;
while (inputManager != null && !(inputManager is InputManager))
inputManager = inputManager.Parent;
if (inputManager != null && (inputManager as InputManager)?.FocusedDrawable == null)
TriggerFocus();
}
base.Update();
}