Previously it was scrolling the page to the top every time page.js
was running. This caused a number of browser issues, like not going
back to the same scroll point when using the back button.
It also prevents us from linking with an anchor tag.
This change causes the scrolling to only happen when a component is
newly rendered to the page, which doesn't happen when the back button
is pushed or when the page is rerendered on the same guide.
This is required for module linking using anchor tags.
And:
We're changing the sortedModules function slightly to include the
id in the object before it is returned in sorted order.
This allows us to use the ID in the div rendering, so that we can link
to it using an anchor tag.
Two changes here:
Previously it was scrolling the page to the top every time page.js was running. This caused a number of browser issues, like not going back to the same scroll point when using the back button.
It also prevents us from linking with an anchor tag.
This change causes the scrolling to only happen when a component is newly rendered to the page, which doesn't happen when the back button is pushed or when the page is rerendered on the same guide.
This is required for module linking using anchor tags.
And:
We're changing the sortedModules function slightly to include the id in the object before it is returned in sorted order.
This allows us to use the ID in the div rendering, so that we can link to it using an anchor tag.