Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Documentation Live Preview #1285

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
never steal focus when revealing the live preview editor
  • Loading branch information
matthewbastien committed Dec 18, 2024
commit 6487a6f242da89c3a8c23ccb8df14b2b3755acd6
6 changes: 3 additions & 3 deletions src/documentation/DocumentationPreviewEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ export class DocumentationPreviewEditor implements vscode.Disposable {
vscode.workspace.onDidChangeTextDocument(this.handleDocumentChange, this),
this.webviewPanel.onDidDispose(this.dispose, this)
);
// Reveal the editor, but don't change the focus of the active text editor
webviewPanel.reveal(undefined, true);
this.reveal();
}

/** An event that is fired when the Documentation Preview Editor is disposed */
Expand All @@ -109,7 +108,8 @@ export class DocumentationPreviewEditor implements vscode.Disposable {
onDidRenderContent = this.renderEmitter.event;

reveal() {
this.webviewPanel.reveal();
// Reveal the editor, but don't change the focus of the active text editor
this.webviewPanel.reveal(undefined, true);
}

dispose() {
Expand Down
Loading