diff --git a/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts b/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts index 1ebb7c9e5ffc0..b553cb5626eea 100644 --- a/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts @@ -122,7 +122,7 @@ export class ExceptionWidget extends ZoneWidget { this.container?.focus(); } - hasFocus(): boolean { + override hasFocus(): boolean { return dom.isAncestor(document.activeElement, this.container); } } diff --git a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts index 9dfc51bd41dfd..fc3433d1aedae 100644 --- a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts @@ -467,7 +467,7 @@ class DirtyDiffWidget extends PeekViewWidget { this.editor.revealLineInCenterIfOutsideViewport(range.endLineNumber, ScrollType.Smooth); } - hasFocus(): boolean { + override hasFocus(): boolean { return this.diffEditor.hasTextFocus(); }