Website Jumps Back Up To Fixed Position On Mobile

Hello

I’m having a problem fixing a client website (apologies I cannot share the link with you).

The site is structured into 7 vertically stacked sections, and on mobile if I scroll to anywhere in the 6th or 7th section, it will occasionally randomly flip back to halfway on the 5th section. If I delete half of the 5th section, then it will flip back to the bottom of the 5th section.

So for some reason it is going back to this fixed point. Sometimes it does it, sometimes not. It is nothing to do with page load as it will do it long after all the images are loaded.

The website was built with Bootstrap, uses scrollspy and has some animations built with such elements as data-animate-time.

Apologies that I cannot share the link, I know this makes it much more difficult when you cannot test but perhaps someone has had a similar issue?

Any suggestions of things I can test would be much appreciated.

Thanks
James

Hi,

As you say without a demo it will be hard for us to offer any advice unless anyone has encountered a similar bug.

I assume you have disabled scrollspy to see if that is the cause? If the problem is with scrollspy then try looking at what problems others have found and see if they match your requirements.

In the end you may need to strip down the site until you can confirm where the bug is coming from and that may give a clue as to its solution.

Good luck.

Yes I have tried disabling scrollspy but with no effect.

Also I should mention that it only happens on Android phones, not iphones. It happens on both Chrome and Firefox.

Are you using fixed position:fixed as mobiles hate position:fixed and older devices didn’t have any support for it.

I always turn position:fixed off for small screens unless its a very small header or footer.

No position:fixed anywhere apart from a scroll back to the top button

Please prepare a stripped down “working page” that demonstrates the problem. That means it should include your scripts, etc. Guessing is no fun.

1 Like

It seems to be something to do with jquery - remove jquery and it doesn’t happen.

I’m getting closer!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.