Fancybox iFrame doesn't scroll on Touch Devices
-
Hello,
I found on touch devices like iPhone/iPad that the iFrame Fancybox wouldn’t scroll wanted to open this as an issue.
I did work around this by disabling Fancybox on Touch – http://wordpress.org/support/topic/disable-fancybox-for-touch
But this is more of a compromise and would still like to use fancybox if scroll can be restored.
Any help appreciated,
Cheers
-
Hi nightbook, the issue is known but to this date, I’ve not been able to find out why scrolling it not possible on iDevices… If you can tell me more, please do 🙂
Thanks RavanH,
I’ve been unsuccessful, attempted a few things I found on other forums such as:
-webkit-overflow-scrolling: touch !important; overflow: scroll !important;They all point to the -webkit-overflow-scrolling: touch but I can’t seem to get that working, maybe you’ll have more luck.
Other related threads:
http://stackoverflow.com/questions/5921688/single-finger-scrolling-for-inner-contents-div-iframes-in-iphone-mobile-safari
http://stackoverflow.com/questions/10805301/how-can-i-scroll-an-iframe-in-ios-4-with-2-fingers
https://github.com/fancyapps/fancybox/issues/2
http://dev.magnolia-cms.com/blog/2012/05/strategies-for-the-iframe-on-the-ipad-problem/
http://readwrite.com/2011/05/19/joe-hewitt-creator-of-facebook-for-iphone-reveals-new-project-scrollability#awesm=~oGYnriK8kgZQUn
http://css-tricks.com/forums/topic/scrolling-iframe-on-ipad/Let me know how I can help,
CheersHi nightbook, while still looking for a solution I got http://wordpress.org/support/topic/version-of-fancyboxjs that apparently solved a problem with pinch’n’zoom on the iPhone. I wonder if it is a related issue…
Thanks RavanH,
Sorry for being taken away from the office for some time, I was finally able to move further on this and ended up being successful installing Fancybox v2.1.5 which resolved the scrolling issue.
I did have some minor adverse affects like lost some of the settings (no-title for example) but would presume that’s minor issues which would be fleshed out if the plugin was updated to use the latest js and tested.
Appreciate you pointing out that the fancybox version itself is slightly out of date, please let me know if you do update that within the plugin.
For now I’m good to go.
All the best,
CheersProblem is that fancyBox 2 is not licenced GPL or compatible and thus is not allowed on the WordPress Plugins repository… That’s why this plugin is sticking to the older version.
Thanks RavanH, sorry to hear.
I attempted to utilize 1.3.6 found here – https://github.com/nvidoni/fancybox/
But sadly it didn’t resolve the issue.
Not sure where to take this if we can’t bring it up to the latest working version of fancybox, I guess we couldn’t implore the developer to provide it under the GPL or suitable license so it can be utilized in this plugin.
Let me know what additional steps we could take or how I can help test or find a proper resolution for this issue.
All the best,
CheersYes.
Version 2.1.5 of the FancyBox script works on tablets.
BUT…
I have no idea how or exactly where to add it to this plugin’s folder.
Can you please advise ?
I downloaded the 2.1.5 version from here…
This worked for me, just add it to your stylesheet:
#fancybox-content { overflow: scroll !important; -webkit-overflow-scrolling: touch !important; }Thanks Mickey,
That fixed my issue so now I can re-enable fancybox for mobile.
Appreciate that,
CheersThanks.
Will give this a try.
Hi Mickey Kay, thanks for sharing your experience. The problem is these scroll rules apply to other content like images too.
Could you test the following alternative?
#fancybox-frame { overflow: scroll !important; -webkit-overflow-scrolling: touch !important; }Please let me know the result. Thanks 🙂
For anyone curious- it goes into the overall style sheet of your theme (ie I put mine in my Custom CSS area)
Worked great!
Actually- this adds an ugly scroll to all of my FancyBox images. Is there a way for this only to apply to iFrames?
Please note that the two style code snippets in this thread are not the same. Did you use
#fancybox-frameor#fancybox-content?Hi RavanH,
Sadly changing the css from #fancybox-content to #fancybox-frame broke the scroll for me. It would only work if I placed the css into the #fancybox-content selector. It appears it’s because the #fancybox-frame is on the actual iframe rather than it’s container.
Potential solution in my mind to target only iframe and not other content is to add a class to the #fancybox-content element of .iframe or .fancybox-iframe or some way so you can target the container as it seems placing the css on the iframe itself doesn’t work.
For now I’ve just switched back to using #fancybox-content as I only use fancybox for iframes on my instance.
Thanks
The topic ‘Fancybox iFrame doesn't scroll on Touch Devices’ is closed to new replies.