Skip to content

Commit 5f8a9f6

Browse files
amungerCopilot
andcommitted
Fix notebook context menu layering
Mount shadow DOM context views at the workbench container so notebook-local stacking contexts cannot obscure them behind adjacent parts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0466f11 commit 5f8a9f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/platform/contextview/browser/contextViewService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export class ContextViewHandler extends Disposable implements IContextViewProvid
4141
domPosition = ContextViewDOMPosition.ABSOLUTE;
4242
}
4343

44-
this.contextView.setContainer(container ?? this.layoutService.activeContainer, domPosition);
44+
const contextViewContainer = shadowRoot && container ? this.layoutService.getContainer(getWindow(container)) : container ?? this.layoutService.activeContainer;
45+
this.contextView.setContainer(contextViewContainer, domPosition);
4546

4647
this.contextView.show(delegate);
4748

0 commit comments

Comments
 (0)