diff --git a/akvo/rsr/static/scripts-src/my-results.js b/akvo/rsr/static/scripts-src/my-results.js index e663e07797..d2a9d62667 100644 --- a/akvo/rsr/static/scripts-src/my-results.js +++ b/akvo/rsr/static/scripts-src/my-results.js @@ -2379,7 +2379,13 @@ function initReact() { // Wait 1s, then smoothly scroll to top window.setTimeout(function() { - smoothScroll.animateScroll('body'); + if (document.getElementById('projectMenu')) { + // Project page + smoothScroll.animateScroll('#projectMenu'); + } else if (document.getElementById('resultProjectTitle')) { + // MyRSR + smoothScroll.animateScroll('#resultProjectTitle'); + } }, 1000); } else { window.location.hash = ''; diff --git a/akvo/rsr/static/scripts-src/my-results.jsx b/akvo/rsr/static/scripts-src/my-results.jsx index 02a69f60cb..7c1bab75c1 100644 --- a/akvo/rsr/static/scripts-src/my-results.jsx +++ b/akvo/rsr/static/scripts-src/my-results.jsx @@ -2379,7 +2379,13 @@ function initReact() { // Wait 1s, then smoothly scroll to top window.setTimeout(function() { - smoothScroll.animateScroll('body'); + if (document.getElementById('projectMenu')) { + // Project page + smoothScroll.animateScroll('#projectMenu'); + } else if (document.getElementById('resultProjectTitle')) { + // MyRSR + smoothScroll.animateScroll('#resultProjectTitle'); + } }, 1000); } else { window.location.hash = ''; diff --git a/akvo/templates/myrsr/my_results.html b/akvo/templates/myrsr/my_results.html index c5c5dcf08b..1f18f2c69a 100644 --- a/akvo/templates/myrsr/my_results.html +++ b/akvo/templates/myrsr/my_results.html @@ -5,7 +5,7 @@ {% block title %}{% trans 'MyRSR - My Results' %}{% endblock title %} {% block myrsr_main %} -