最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - How to prevent scrolling in iframe when reach the bottom of the iframe? - Stack Overflow

programmeradmin3浏览0评论

I have 2 projects, the "main" one is in SquareSpace and I am rendering another React project inside as an iframe.

My issue is when I am scrolling in the iframe and reaching the bottom of the iframe I cannot keep scrolling on the page and reach the footer of the "main" project.

This issue appears on mobile, what is the best way to tackle this issue?

Thank you!

Header of SquareSpace
  <div style="position: relative; width: 100%; height: 100vh; margin-bottom: 80px;">
    <iframe id="custom-iframe" 
            src="myReactApp" 
            width="100%" 
            height="100%"
            style="border: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; scrolling: no;">
    </iframe>
  </div>
 Footer of SquareSpace
发布评论

评论列表(0)

  1. 暂无评论