notebook - composite editor announces active editor only if it has focus

This commit is contained in:
Johannes Rieken 2020-05-13 11:21:57 +02:00
parent 1c8c9cf5f2
commit 9ac6ff7357

View file

@ -136,7 +136,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
get activeCodeEditor(): IEditor | undefined {
const [focused] = this.list!.getFocusedElements();
return this.renderedEditors.get(focused);
const candidate = this.renderedEditors.get(focused);
return candidate?.hasWidgetFocus() ? candidate : undefined;
}
//#region Editor Core