S
S
sanex33392015-04-29 17:02:34
JavaScript
sanex3339, 2015-04-29 17:02:34

How to solve the old problem with fixed elements in iOS 8 Safari?

So, I ran into a problem that has been going on since ios 5, which is described here, item
Scrolling == unusable position: fixed element
Video: https://youtu.be/R2MzdeJSCKw
https://remysharp.com/2012/05/ 24/issues-with-posit...
There are slight differences from the video in my situation. There is a fixed overlay, in it a window with buttons, if you reload the page, then after autoscrolling to the position of the window preceding the reload, the buttons are visually in the right place, but they are not clicked. Clicking on them is defined in the empty space at the very top of the window.
All the solutions that are on the Internet for this problem did not help me.
Tried the solutions from here blog.14islands.com/post/30313367126/solved-positio...
The only thing I came up with that works is

var scrollPos = window.pageYOffset;
var tempScrollPos = scrollPos - 1;
$('body, html').scrollTop(tempScrollPos).animate({scrollTop: scrollPos}, 1);

But I don't like the scrolling solution.
Has anyone encountered a similar problem and what methods of circumventing it did you use?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question