diff --git a/extensions/ql-vscode/src/view/results/Graph.tsx b/extensions/ql-vscode/src/view/results/Graph.tsx index 3f81f5d9b4f..0c82e41c008 100644 --- a/extensions/ql-vscode/src/view/results/Graph.tsx +++ b/extensions/ql-vscode/src/view/results/Graph.tsx @@ -48,7 +48,10 @@ export function Graph({ graphData, databaseUri }: GraphProps) { d.attributes["xlink:href"] = "#"; d.attributes["href"] = "#"; loc.uri = `file://${loc.uri}`; - select(this).on("click", () => jumpToLocation(loc, databaseUri)); + select(this).on("click", (event: Event) => { + jumpToLocation(loc, databaseUri); + event.preventDefault(); // Avoid resetting scroll position + }); } } if ("fill" in d.attributes) {