I'm having a problem with overscrolling a div in mobile safari. I have a nested structure with body { position: fixed }
, inside which I have a parent and a child div. The container div has: .container { overflow-y: scroll; -webkit-overflow-scrolling: touch; }
and a max-height
property that is set dynamically by javaScript.
When I overscroll the container in mobile safari beyond the content of the child-div (kicking in the 'overscroll' or 'elastic / rubber-band' scroll effect, I get all kinds of jitters, as shown here:
I've scoured SO and every other resource I could find but to no avail. One piece of info I feel is likely relevant:
If i disable scrolling on the element, I can drag the screen as if I was attempting to scroll and sometimes I can get the bottom of child content to disappear and reveal the background of the container div of about ~40px on iPhone. It's roughly the size of the control bar at the bottom, but appears ABOVE the control bar.
I also read in a deeply buried comment that there was once a bug with safari triggering resize events on scroll, but I've set event listeners to alert if a resize event is triggered to test, and haven't gotten that to occur.
I'm lost as to what to search for to remedy this. Ideas on what is causing this?
Note: FWIW, this is being built in React with create-react-app.