iphoneiframesafariresponsiveiframe-resizer

Bootstrap modal pop up issue on Iphone


I am using iframe-resizer for cross domain application, The Iframe loads fine in desktop and andriod devices but on my Iphone, I am facing below issue:

The bootstrap modal pop ups on Iframe app is hiding and flickering behind when I scroll on page. I tried

-webkit-overflow-scrolling: touch;

on container of Iframe but that does not work.

Any help/suggestion will be highly appreciated.


Solution

  • We fixed the issue by using position:absolute instead of position:fixed

    Position fixed and absolute are somewhat similar in behavior. Both use x,y positioning in the view port and both are outside of the DOM document flow so other content is not affected by the placement of containers. Both require zIndex positioning to determine vertical priority in the view stack.

    Position fixed keeps the element pinned at whatever position you set it to regardless of the scroll position of the browser. This makes sense in some scenarios where you actually want to scroll the entire page but leave content in place. The key to remember is to not use it when you build have your own scrollable content on the page.

    It turns out in my case I don’t really need position:fixed because I manage the position and size of the container and toolbar headers and footers myself anyway. I know where everything is positioned and keep the content area effectively wedged in the middle of the statically sized elements. By way of CSS and media queries I can force the header to the top and the footer on the bottom using fixed sizes which means I can safely use position:absolute.