Skip to main content
talented_parent98A2
Participant
August 19, 2019
Answered

iframe embed onload scroll

  • August 19, 2019
  • 4 replies
  • 4030 views

How do you disable onload scroll from occurring when using iframe embed adobe xd on a website? Is this a bug that adobe should fix? @Adobe XD

This topic has been closed for replies.
Correct answer Ares Hovhannesyan

Adobe Xd haven't such setting for Actions. Please .add your idea to Adobe XD Feedback : Feature Requests & Bugs for including it in upcoming updates.

From other side may be the Animation Action can solve this, but I am not sure in your case

4 replies

Participant
February 18, 2020

I'm having the same issues. Did you ever find a fix?

Participant
February 23, 2020

I added loading="lazy" to my XD iframe embed code and that stops the page load auto-scroll issue I've been having. Got the code here: https://web.dev/native-lazy-loading/ -- good luck!

Participant
March 13, 2020

Sadly, that didn't work for me 😞 I added loading="lazy" to the iframe code but it doesn't seem to make a difference. 

talented_parent98A2
Participant
August 19, 2019

<center><iframe onload="window.parent.scrollTo(0,0)" width="100%" height="950" src="https://xd.adobe.com/embed/5d00b5c4-98af-4e84-5427-912deff88d66-2b31/" frameborder="0" scrolling="no" style="overflow: hidden" overflow-x:hidden;

overflow-y:hidden;></iframe></center>

Above is my iframe code. I add onload="window.parent.scrollTo(0,0) to stop the page from auto scrolling to the iframe location but still does it.

I have two adobe xd iframes on my website

https://www.adriennestevson.com/uiux-projects/primary-toys-process

Ares Hovhannesyan
Community Expert
Ares HovhannesyanCommunity ExpertCorrect answer
Community Expert
August 20, 2019

Adobe Xd haven't such setting for Actions. Please .add your idea to Adobe XD Feedback : Feature Requests & Bugs for including it in upcoming updates.

From other side may be the Animation Action can solve this, but I am not sure in your case

Ares Hovhannesyan
Community Expert
Community Expert
August 19, 2019

Can you give more information what you want too achieve? Thank you

Sjaani
Community Expert
Community Expert
August 19, 2019

This sounds more like something to be fixed within iframe than XD.

Does adding scrolling="no" into the <iframe> code get the result you are after?

talented_parent98A2
Participant
August 19, 2019

That code would only help if I had a scroll bar on the side of the iframe I was trying to get rid of. The problem I am having is when the page load it auto scroll to the position where the iframe is.