Iframe scrolls to iframe when loading page

Hi

My iframes jump to the iframe on the middle of the page when loading the page.

I tried to add css

onload=“top.scrollTo(0,0)”
scroll=“no”

but it still jumps in Mozilla and Safari but not Chrome.

Any suggestions for a solution?

The site is www.negovista.com

Best regards
Flemming

Hi Flemming,

I checked your site there is a Javascript error when I looked the console that might be causing this. If you have added some custom code to the site that may have caused the scrolling issue, kindly try removing the code then check the site again.

Please check this link on how to use the Google Chrome console to check for Javascript errors:

https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors

Also, try adding the iFrame to a different page and see if the issue happens. If you are seeing the issue, it could be something that is native to the iFrame code that you have.

Lastly, you might want to check and try the suggestions from this here:

Hope this helps.

Hi

Thanks for the suggestions.

I disabled a plugin which I think stopped the Javascript error.

The iframe issue with Firefox and Safari persist though.

I have tried the following with the iframe

iframe style=“display: none;” onload=“this.style.display=‘block’;” href="…">

iframe style=“position: absolute; top: -9999em; visibility: hidden;” onload=“this.style.position=‘static’; this.style.visibility=‘visible’;” href="…">

iframe src= onLoad=“self.scrollTo(0,0)”>

iframe src= onLoad=“self.scrollTo(0,0)” scrolling=“no”>

And adding this to css from this suggestion:

pointer-events:none;

iframe {
overflow:hidden;
}

None of it works however.

Do you have other suggestions?

Thx
Flemming

Hi There,

That custom code will require custom development work which falls outside the scope of support we can offer. I recommend you to contact to a 3rd party to help you with this.

Thank you for your understanding!

Regards!

Hi

Ok, no worries. Thx anyway.

Best regards
Flemming

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.