File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
packages/vscode-extension Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,18 @@ export function registerDisposables(): Disposable[] {
4444 const queryDetailsProvider = new Neo4jQueryDetailsProvider ( ) ;
4545 const queryVisualizationProvider = new Neo4jQueryVisualizationProvider ( ) ;
4646 const renderBottomPanel = async ( statements : string [ ] ) => {
47- await commands . executeCommand ( 'neo4jQueryDetails.focus' ) ;
48- await commands . executeCommand ( 'neo4jQueryVisualization.focus' ) ;
47+ try {
48+ await commands . executeCommand ( 'neo4jQueryDetails.open' , {
49+ preserveFocus : true ,
50+ } ) ;
51+ await commands . executeCommand ( 'neo4jQueryVisualization.open' , {
52+ preserveFocus : true ,
53+ } ) ;
54+ } catch ( e ) {
55+ /* no-op */
56+ //If a user (or a test framework) has an old version of vscode, <webview>.open won't exist
57+ //A user can still open the webview manually, so we prefer not to remove focus from the editor
58+ }
4959 await queryVisualizationProvider . viewReadyPromise ;
5060 await queryDetailsProvider . executeStatements ( statements ) ;
5161 } ;
Original file line number Diff line number Diff line change @@ -54,9 +54,8 @@ suite('Params panel testing', () => {
5454
5555 before ( async ( ) => {
5656 workbench = await browser . getWorkbench ( ) ;
57- await workbench . executeCommand (
58- 'Query Results: Focus on Query Details View' ,
59- ) ;
57+ await workbench . executeCommand ( 'neo4jQueryDetails.focus' ) ;
58+ await workbench . executeCommand ( 'neo4jQueryVisualization.focus' ) ;
6059 } ) ;
6160
6261 async function escapeModal ( count : number ) {
You can’t perform that action at this time.
0 commit comments