Reveal panel on navigate, to prevent webview destruction
This commit is contained in:
@@ -176,6 +176,11 @@ export class ResultsView extends AbstractWebview<IntoResultsViewMsg, FromResults
|
||||
}
|
||||
|
||||
async navigateResultView(direction: NavigationDirection): Promise<void> {
|
||||
if (!this.panel?.visible) {
|
||||
return;
|
||||
}
|
||||
// Reveal the panel now as the subsequent call to 'Window.showTextEditor' in 'showLocation' may destroy the webview otherwise.
|
||||
this.panel.reveal();
|
||||
await this.postMessage({ t: 'navigate', direction });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user