Skip to content

Commit

Permalink
Attach QP to body but position at top of main panel (#11054)
Browse files Browse the repository at this point in the history
Fixes a bug where the quick-pick could be occluded by the right panel
  • Loading branch information
colin-grant-work authored Apr 22, 2022
1 parent 7ef8e9d commit 552b5ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/monaco/src/browser/monaco-quick-input-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export class MonacoQuickInputImplementation implements IQuickInputService {
this.initContainer();
this.initController();
this.quickAccess = new QuickAccessController(this, StandaloneServices.get(IInstantiationService));
this.controller.onShow(() => {
this.container.style.top = this.shell.mainPanel.node.getBoundingClientRect().top + 'px';
});
}

setContextKey(key: string | undefined): void {
Expand Down Expand Up @@ -156,7 +159,7 @@ export class MonacoQuickInputImplementation implements IQuickInputService {
private initContainer(): void {
const container = this.container = document.createElement('div');
container.id = 'quick-input-container';
this.shell.mainPanel.node.appendChild(this.container);
document.body.appendChild(this.container);
}

private initController(): void {
Expand Down

0 comments on commit 552b5ee

Please sign in to comment.