Skip to content

Commit

Permalink
Merge pull request #2 from trypear/main
Browse files Browse the repository at this point in the history
Fix overlay popping up for half a second at startup (trypear#77)
  • Loading branch information
charlwillia6 authored Oct 25, 2024
2 parents 8466ac3 + d4808c5 commit 23d917b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ product.overrides.json
.vscode-test
extensions/pearai-submodule
extensions/pearai-ref
.prompts
7 changes: 5 additions & 2 deletions src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ export class PearOverlayPart extends Part {

// if both content and webview are ready, end loading state and open
if (this.popupAreaOverlay && this.webviewView) {
this.webviewView?.webview.layoutWebviewOverElement(this.popupAreaOverlay);
this.open();
//this.webviewView?.webview.layoutWebviewOverElement(this.popupAreaOverlay);
// createContentArea is called within the workbench and layout when instantiating the overlay.
// If we don't close it here, it will open up by default when editor starts, or appear for half a second.
// If we remove this completely, it gets stuck in the loading stage, so we must close it.
this.close();
} else {
// hide stuff while we load
this.fullScreenOverlay!.style.display = "none";
Expand Down

0 comments on commit 23d917b

Please sign in to comment.