Fixed position delayed on IOS
Asked Answered
P

1

5

After I tested affix on my website on iPad I find out that it is not working properly and I goggled that it is problem with iOS https://github.com/twbs/bootstrap/issues/11560 and currently there is no easy solution for that.

iOS just has problems with calculating fixed position as you scroll. Basically you don't get an updated fixed position until a slight delay after you stop scrolling

Is there anything I can do to make it work, may be some one already done some work around?

Pool answered 25/12, 2013 at 11:48 Comment(3)
If you read the entire thread there's no answer to make it work.Prostration
yes I did, but just wondering may be some one outside that thread, here on SO, have any opinions on that.Pool
Change the title to "fixed position delayed on IOS" or something. If you read that thread you'll see that @fat (the programmer for Bootstrap's scripts) and the person behind WayPoints (one of the most popular affix scripts) have found no solutions because it's an IOS native behavior. You'll notice that if the section is position:fixed on load, that this doesn't happen but if the affix is triggered by a user action (scroll) the delay happens.Prostration
R
9

This, sometimes, made the trick for me.

    .youraffixelement {
       -webkit-transform: translate3d(0, 0, 0);
       transform: translate3d(0, 0, 0);
    }

It enables hardware acceleration on iOs devices, and the scroll position is calculated faster.

Rucksack answered 28/4, 2016 at 9:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.