diff --git a/src/ui/Features/Shared/MessageBox.cs b/src/ui/Features/Shared/MessageBox.cs index 9e859e0a7b..351ecfa11f 100644 --- a/src/ui/Features/Shared/MessageBox.cs +++ b/src/ui/Features/Shared/MessageBox.cs @@ -242,6 +242,12 @@ public static async Task Show( string? custom3 = null) { var msgBox = new MessageBox(title, message, buttons, icon, custom1, custom2, custom3); + + // Keep the message box above undocked tool windows (audio visualizer / video player), + // which float on top of the main window via KeepTopmostWhileOwnerActive. Without this the + // message box opens behind them in undocked mode. (#12268) + WindowService.KeepTopmostWhileOwnerActive(msgBox, owner); + return await msgBox.ShowDialog(owner); }