Skip to content

Commit 9d98da3

Browse files
authored
Remove notebook view from focus order & accessibility tree when hidden (microsoft#209059)
* Remove notebook view from focus order when hidden * Set `inert` on the correct container
1 parent cea6ec5 commit 9d98da3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
409409
this._overlayContainer.id = `notebook-${id}`;
410410
this._overlayContainer.className = 'notebookOverlay';
411411
this._overlayContainer.classList.add('notebook-editor');
412+
this._overlayContainer.inert = true;
412413
this._overlayContainer.style.visibility = 'hidden';
413414

414415
container.appendChild(this._overlayContainer);
@@ -1839,6 +1840,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
18391840
this._list.updateOptions({ paddingBottom: this._allowScrollBeyondLastLine() ? Math.max(0, (newCellListHeight - 50)) : 0, paddingTop: 0 });
18401841
}
18411842

1843+
this._overlayContainer.inert = false;
18421844
this._overlayContainer.style.visibility = 'visible';
18431845
this._overlayContainer.style.display = 'block';
18441846
this._overlayContainer.style.position = 'absolute';
@@ -1968,6 +1970,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
19681970
onWillHide() {
19691971
this._isVisible = false;
19701972
this._editorFocus.set(false);
1973+
this._overlayContainer.inert = true;
19711974
this._overlayContainer.style.visibility = 'hidden';
19721975
this._overlayContainer.style.left = '-50000px';
19731976
this._notebookTopToolbarContainer.style.display = 'none';

0 commit comments

Comments
 (0)