diff --git a/src/vs/workbench/contrib/debug/browser/debugHover.ts b/src/vs/workbench/contrib/debug/browser/debugHover.ts index c45488e046402dd3c52da32df6d28442d79bd094..323c3be37c82bc3b782660e8f2b7f79c534d37ed 100644 --- a/src/vs/workbench/contrib/debug/browser/debugHover.ts +++ b/src/vs/workbench/contrib/debug/browser/debugHover.ts @@ -273,11 +273,13 @@ export class DebugHoverWidget implements IContentWidget { return; } + if (dom.isAncestor(document.activeElement, this.domNode)) { + this.editor.focus(); + } this._isVisible = false; this.editor.deltaDecorations(this.highlightDecorations, []); this.highlightDecorations = []; this.editor.layoutContentWidget(this); - this.editor.focus(); } getPosition(): IContentWidgetPosition | null {