My website where I have an embed code seems to load and then automatically scroll to where the code is on the page. Is there any way to stop this?
It occurs on this page:
I saw this on GitHub:
The thinking being that if it is some focus stealing script on a remote page that you can’t control, the browser won’t focus a hidden element. And there’s a good likelihood that your onload will fire after their focus changing script.
Also suggesting there:
<iframe style="display: none;" onload="this.style.display='block';" href="..."></iframe>
<iframe style="position: absolute; top: -9999em; visibility: hidden;" onload="this.style.position='static'; this.style.visibility='visible';" href="..."></iframe>