From aa35591b4d3c51d07fbbc960212be1489a16b59f Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Wed, 15 Nov 2023 12:23:39 -0600 Subject: [PATCH] Fix autoscroll issue on new Subjects page --- src/app/pages/subjects/new/specific/navigator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/pages/subjects/new/specific/navigator.js b/src/app/pages/subjects/new/specific/navigator.js index 27d7f3f96..1cad2f24d 100644 --- a/src/app/pages/subjects/new/specific/navigator.js +++ b/src/app/pages/subjects/new/specific/navigator.js @@ -33,7 +33,9 @@ function SectionLink({id, text}) { // Handle scrolling here initially if the hash is set React.useEffect( () => { - if (hash.substr(1) === id) { + const decodedHash = decodeURIComponent(hash).substring(1); + + if (decodedHash === id) { goTo(id); } },