NO BUG: Anchor links not working on first load

Hey, I ran into bug with anchor links. Basically after first page load (first click on menu item), anchor links to different section. On second click, everything is working fine. Thanks for any help!

Website: https://robertruzek.dev

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

[Please describe this bug in as much detail as possible so we can replicate & debug this bug]

Hi @robert_looplabs,

First of all, you’ve got an incredible website :star_struck:

I’m also experiencing the issue you’ve described. After some debugging it seems like you have lazy loading for your images:

So most likely there’s a layout shift after the images are requested.

With further inspection, I found that some of your images specified heights are larger than the rendered images:

Let me know if this helps :slight_smile:

Best regards,
Charaf

2 Likes

Hey @charaf, thanks a lot!! :slight_smile:

This indeed fixed my issue :heart_eyes:. The lazy load seems to cause tons of bugs, matter of fact, I created post on fb page regarding this. For example, when lazy load is used, some of the images dont load at all on mobile. Is there something I am missing? Thanks a lot!

1 Like

Great to hear this resolved it :slight_smile:

I’m not aware of such bugs with lazy loading but if you’re using another plugin that also enables lazy loading, it could lead to some issues.