Search code examples
javascripthtml.htaccessanchor

Page automatically jumping to first link of the website after loading


So, I have this weird behaviour on my website:

After fully loading the page, it automatically fires the first found link. Currently, it is firing the accessibility Skip button, which has #main as href. When I delete it, it fires the second one, a pdf of my résumé.

It wasn't like that a week ago, but now it has this weird behaviour. I tested on Chrome, Safari, Firefox and Edge on macOS and also on Windows' Edge. All of them behave the same way.

I will appreciate any help. I don't know what else to do.


Solution

  • The problem is the function clickBlur (it triggers all the "a" tags on the page) used on window.onload in general.js file. Comment the line where you use the function and try an alternative (CSS) to blur links.