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.
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.
- Code refactoring and optimization
- Initialize Unit Tests
- Upgrade to SPFx 1.11
You can find more details in the repo:
Hoping this post will help you 😉