From 8d294a4eca6fefee6f7784a8ac99659d03e38ce2 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 30 Jan 2017 14:03:05 -0500 Subject: [PATCH] Only grab focus if nothing else has it --- osu.Game/Screens/Select/SearchTextBox.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/SearchTextBox.cs b/osu.Game/Screens/Select/SearchTextBox.cs index 8b95d74fb5..a6790e1130 100644 --- a/osu.Game/Screens/Select/SearchTextBox.cs +++ b/osu.Game/Screens/Select/SearchTextBox.cs @@ -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(); }