From acafeac1cc85bed2a733c10113b8f7351c1f273d Mon Sep 17 00:00:00 2001 From: Thomas Ghysels Date: Wed, 13 Feb 2019 17:59:32 +0100 Subject: [PATCH] Fix #561 --- runtime/src/app/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/app/app.ts b/runtime/src/app/app.ts index 1c2d1be..1d7decb 100644 --- a/runtime/src/app/app.ts +++ b/runtime/src/app/app.ts @@ -158,7 +158,7 @@ export async function navigate(target: Target, id: number, noscroll?: boolean, h if (hash) { // scroll is an element id (from a hash), we need to compute y. - const deep_linked = document.querySelector(hash); + const deep_linked = document.getElementById(hash.slice(1)); if (deep_linked) { scroll = { @@ -338,4 +338,4 @@ export function load_component(component: ComponentLoader): Promise<{ function detach(node: Node) { node.parentNode.removeChild(node); -} \ No newline at end of file +}