stutrek/scrollmonitor

Doesn't work inside iframe on iOS (workaround found)

GordanRatkovic opened this issue · 4 comments

Tested with the demo page

Tested a project we're working on, and same issue, no events in iOS if iframed. Has this been acknowledged?

If you make a PR and I'll almost definitely accept it.

@GordanRatkovic Dunno if you ever figured it out, but for anyone else having this issue, it is not problem with scrollMonitor, but rather how ios safari handles iframes.

The iframe size is not properly sized, and just ends up taking up the entire content size. This causes the animations to all be "in view" at load.

Solution is to wrap all of the content in the iframe src (not in iframe) and give this wrapper the style
#wrap { position: fixed; top: 0; right:0; bottom:0; left: 0; overflow-y: scroll; -webkit-overflow-scrolling: touch; }

@stutrek I think this issue can be closed

Thanks for figuring it out. I'll leave this issue open for anyone else with this problem.