Race Condition in Anchor navigation #7826
Labels
🐛 bug
Something isn't working, or isn't working as expected
need more info
Further information is requested
p3
We don't have visibility when this will be addressed.
ux
make the user experience awesome
MDN URL
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Introduction#re-engageability
What specific section or headline is this issue about?
Any anchored link
What information was incorrect, unhelpful, or incomplete?
I found that navigating directly to an anchor link only sometimes works. I am on Fibre broadband in the UK, but delays loading are still enough to introduce a race condition. My suspicion is that when the anchor is evaluated the content hasn't loaded, yet. This should be addressed by ensuring anchors are (re)evaluated after content load.
An example is as follows. Loading this URL should scroll directly to an inline anchor. However, it manages this only sometimes and more often than not it directly navigates to the head of the page as if there were no anchor.
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Introduction#re-engageability
By contrast, navigating from links in the contents table of the
Introduction
page itself (after the page has already loaded) is successful and there is indeed an anchor in the page.I first encountered this in Chrome by right-clicking from the contents table, and choosing to open an anchored link in a new tab (although I didn't know it was an anchor at the time). When I switched to the tab I found it hadn't navigated to any corresponding content at all.
What did you expect to see?
Navigation to anchors should work
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
The text was updated successfully, but these errors were encountered: