ember-url-hash-polyfill icon indicating copy to clipboard operation
ember-url-hash-polyfill copied to clipboard

Does not catch some initial page load cases

Open MichalBryxi opened this issue 4 years ago • 0 comments

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 uiSettled function 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 debugger just 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 uiSettled returns before all the route models resolve

MichalBryxi avatar Aug 04 '21 10:08 MichalBryxi