diff --git a/core/workspace_svg.ts b/core/workspace_svg.ts index b791ceb79..8c3f014e2 100644 --- a/core/workspace_svg.ts +++ b/core/workspace_svg.ts @@ -2755,8 +2755,9 @@ export class WorkspaceSvg /** See IFocusableTree.onTreeBlur. */ onTreeBlur(nextTree: IFocusableTree | null): void { - // If the flyout loses focus, make sure to close it. - if (this.isFlyout && this.targetWorkspace) { + // If the flyout loses focus, make sure to close it unless focus is being + // lost to a different element on the page. + if (nextTree && this.isFlyout && this.targetWorkspace) { // Only hide the flyout if the flyout's workspace is losing focus and that // focus isn't returning to the flyout itself or the toolbox. const flyout = this.targetWorkspace.getFlyout();