A new version of the Scroll Back to Top extension was released to display a button that can allow all the users to scroll back to the top of the page, the site content, a list view or a library view.

New version of Scroll back to top - v1.0.0

Due to some reported issues with the icon visibility and to the latest updates made by Microsoft, a new release was necessary to keep this extension usable.

Fix scroll to top from pages

A few weeks ago, the generated SharePoint HTML has changed. The CSS class used to scroll to top of a page (Site Pages) does not exist anymore.

A new HTML attribute is used now. This one should be more durable.

Use REACT render rather than JavaScript

In the previous version, the button was generated directly via JavaScript, now a React render is used to do this.

Rather than using an event listener to catch the user 's click, a handler is used. Thanks to this method, we ensure that only one event listener is created (partial load page could cause some doublons) and that the script is executed on demand.

Other

  • Code refactoring and optimization
  • Initialize Unit Tests
  • Upgrade to SPFx 1.11

More information

You can find more detail into the repo:

Releases ยท Microsoft SharePoint / SPFx / Scroll To Top
A SharePoint Framework extension that allow user to scroll to the top of page by clicking a button

Hoping this post will help you ๐Ÿ˜‰