Skip to content

Commit 1a9d328

Browse files
never steal focus when revealing the live preview editor
1 parent e4e378f commit 1a9d328

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/documentation/DocumentationPreviewEditor.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ export class DocumentationPreviewEditor implements vscode.Disposable {
117117
vscode.workspace.onDidChangeTextDocument(this.handleDocumentChange, this),
118118
this.webviewPanel.onDidDispose(this.dispose, this)
119119
);
120-
// Reveal the editor, but don't change the focus of the active text editor
121-
webviewPanel.reveal(undefined, true);
120+
this.reveal();
122121
}
123122

124123
/** An event that is fired when the Documentation Preview Editor is disposed */
@@ -131,7 +130,8 @@ export class DocumentationPreviewEditor implements vscode.Disposable {
131130
onDidRenderContent = this.renderEmitter.event;
132131

133132
reveal() {
134-
this.webviewPanel.reveal();
133+
// Reveal the editor, but don't change the focus of the active text editor
134+
this.webviewPanel.reveal(undefined, true);
135135
}
136136

137137
dispose() {

0 commit comments

Comments
 (0)