Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get an iframe colorbox to scroll on an iPad with iOS 6

Tags:

jquery

css

ios

I am using iframe colorboxes all over a site I have developed. They work fine but the major problem is that they don't scroll in iOS 6 (or any iOS that I can tell). I have tried many solutions online but none of them work 100%. The closest I got was the setTimeout one but that one has a bug that kept shooting me to the top.

Does anyone have a good solution for this issue?

like image 428
Keith Avatar asked Nov 20 '25 07:11

Keith


1 Answers

At this hour, I'm solving for this issue using iScroll4 for iPad/Pod/Phone, as iOS does not support position:fixed.

Edit:
Child Page (iFramed from parent)

<html>
<body>
<div id="scroller-parent"><!-- position:absolute -->
    <div id="scroller"><!-- position:relative -->
    ... content of scrollable iFrame content ...
    </div>
</div>
</body>
</html>
like image 170
Dawson Avatar answered Nov 22 '25 21:11

Dawson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!