I think what’s happening is that you’re clicking on a little sliver of the link that contains #site-text-logo?
The structure is: div.title a #site-text-logo and you’re catching clicks on #site-text-logo specifically, but not the a that it’s wrapped in)
You can probably event.preventDefault(); the .title a link within your JS, or possibly try .title a {pointer-events: none;} in the CSS?