ember-url-hash-polyfill
ember-url-hash-polyfill copied to clipboard
Does not catch some initial page load cases
The problem
On initial page load (or empty cache & hard page reload) the scroll to hash does not happen. In other cases (navigation, soft page reload, ...) it works.
Observations
- Happens only on "empty cache & hard reload"
- We get pass the
uiSettledfunction call - We see the "Tried to scroll to element with id or name "${hash}", but it was not found" message in the console, but:
- The element with given ID is eventually present; On subsequent soft page reload everything works
- If we pause in
debuggerjust before the warning message (above) then we can see that the UI is not fully settled (loading spinners and such) - If we try to debug the steps we can see that
uiSettledreturns before all the routemodels resolve