skrollr icon indicating copy to clipboard operation
skrollr copied to clipboard

iOS page cutoff

Open dwkoss opened this issue 10 years ago • 7 comments

I'm running into an issue in safari in iOS where the page gets cut off at a random point. Has anyone else seen this issue before? Here is a link to the site that I've been putting together : http://jennaparysek.com/

Thanks!

dwkoss avatar Jul 25 '14 02:07 dwkoss

The only issue I have without your site in a gap at the bottom of the page (iOS 7.0.6 on 4s). But there's nothing cut off.

Prinzhorn avatar Jul 29 '14 15:07 Prinzhorn

@dwkoss: I had the same issue with the 'arbitrary cutoff'. The trick is to use keyframes to tell Skrollr where the end of #skrollr-body content is. You've obviously discovered this too, it seems. However, in this case, I'd suggest using a keyframe reference for #bottom, instead of the existing #bottom + .gap reference. That should eliminate the extra 100% viewport height currently at the bottom of mobile. Here's a more verbose explanation in case it's of any help.

paskainos avatar Aug 12 '14 17:08 paskainos

It's probably caused by images (or other content) that are not loaded yet, which results in a smaller document height on init. Try wrapping the skrollr refresh function in the imagesLoaded callback:

$('#skrollr-body').imagesLoaded(function() {
   s.refresh();
});

https://github.com/desandro/imagesloaded

Twansparant avatar Aug 29 '14 15:08 Twansparant

@Twansparant this particular issue is unrelated to content not yet being (fully) loaded. In testing (and in production) I used imagesLoaded, but that didn't resolve the issue. I even went so far as to (pre)set the height of each #skrollr-body > div prior to skrollr execution, but again to no avail. For more info take a look at my other, more detailed comment, along with the example I created to reproduce the issue - which you'll notice doesn't use image size as a means of determining container height for any of the #skrollr-body > div containers.

paskainos avatar Sep 04 '14 19:09 paskainos

Thanks @Twansparant it fixed the issue for me !

ocombe avatar Sep 23 '14 09:09 ocombe

Same issue here. This fixed the issue for me.

$(window).on('load', function() {
    skrollr.init({ forceHeight: false })
}

This fix also tends to that not all images are fully loaded yet. The height which is being cut off equals the image height in the header. Sry but it's not possible for me to give you an example.

bierik avatar Oct 12 '15 14:10 bierik

Thank you @bierik! Your fix worked perfectly for me and also fixed the issue of the images not being fully loaded.

Christin10-10m avatar Feb 17 '16 21:02 Christin10-10m