From 8d0fb85dd596380e3033a603477471a3cea5806b Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sat, 8 Aug 2026 00:10:26 +0300 Subject: [PATCH] Fix content browser stealing focus from popup asset windows --- Source/Editor/GUI/ContextMenu/ContextMenuBase.cs | 2 ++ Source/Editor/Windows/ContentWindow.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs index 3947430f9..aa1952525 100644 --- a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs +++ b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs @@ -299,7 +299,9 @@ namespace FlaxEditor.GUI.ContextMenu PerformLayout(); if (UseVisibilityControl) { +#if !PLATFORM_SDL _previouslyFocused = parentWin.FocusedControl; +#endif Focus(); OnShow(); } diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 2d9daabeb..b08faeec9 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -768,9 +768,11 @@ namespace FlaxEditor.Windows _newElement.Dispose(); _newElement = null; +#if !PLATFORM_SDL // Focus content window Focus(); RootWindow?.Focus(); +#endif } // Refresh database and view now