I have created a modern page with a few elements on it (hero webpart, a forms web part, weather web parts...). I work with SharePoint Online. At the bottom of the page, I added a regular list webpart as well. When this page loads, instead of staying at the top, it automatically scrolls down to the list view webpart, no matter where it is. It seems that it is calling the attention to it automatically.

Is there anyway to keep the page scrolled to the top and let the user scroll down when he/she wants?

  • Any solution to this issue?
    – sunil b
    Aug 5, 2020 at 23:02

1 Answer 1


You could try using jQuery to force stop the scrolling. If you want, You could try using "Content Editor" web part and insert HTML Snippets.

You could do so by add a "Content Editor" web part. Afterwards click the upper right corner of the web part and click "Edit Snippet" and insert your HTML Snippet. click apply and click okay.

<script type="text/javascript">
$(document).ready(function () 
    $("#s4-workspace").animate({scrollTop: $('#grad2').offset().top-100}, 1000);

PS: Though this code may not stop the auto scrolling. This code however scrolls back up.

  • There is no content editor webparts in modern pages though Jul 16, 2018 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.