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 news release was necessary to keep this extension usable.

Fix scroll to the top from pages

A few weeks ago, the generated SharePoint HTML has changed. The CSS class used to scroll to the 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 duplicates) 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 details in the repo:

SharePoint - Scroll To the Top



Hoping this post will help you πŸ˜‰

You may also be interested in