lodash.com
lodash.com copied to clipboard
Anchor tags are not working in Chrome on first load
Reproduction:
- Chrome 91.0.4472.106
- MacOS 11.4
- Open URL with anchor tag, e.g. https://lodash.com/docs/4.17.15#concat
Expected: Website jumps to anchor (concat in this example) Actual: Website stays on the top of the page
Note that anchor tags work correctly after the page has been loaded, i.e. clicking on an anchor link will scroll the screen to position it at the top and change the URL. I suspect that the lodash website may have delayed rendering which breaks the anchor links on load. Perhaps a workaround like https://stackoverflow.com/a/38588927/323177 could work? Or deferring rendering until all components are available?