My page jumps to the top when I embed this gdrive iframe, once you click on the iframe:
<iframe height="400px" frameborder="0" width="600px" src="https://docs.google.com/document/d/1u9NFjTPBd-9mucQUPvkqLP84iV6uaEcJNF5vQdHmYh8/edit?usp=sharing&rm=embedded"></iframe>
JSFiddle: https://jsfiddle.net/0qpe53os/
Question: Why does it do so and how can I prevent it from doing so?
I tried to preventDefault
without any luck. Thanks a lot in advance for your help.
I'm not sure if this is useful. By the way you could use the onload attribute to scroll the page down: onload="scroll(0,screen.height);"
<iframe height="400px" frameborder="0" width="600px" src="https://docs.google.com/document/d/1u9NFjTPBd-9mucQUPvkqLP84iV6uaEcJNF5vQdHmYh8/edit?usp=sharing&rm=embedded" onload="scroll(0,screen.height);"></iframe>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With