Tapping an input to focus on it in mobile safari results in the cursor and scroll position jumping to a point some distance below the input, then "flying" up to the input by scrolling.
Focus the field without scrolling/flying.
Tested on iPhone 5S/iOS 9.3.5 and iPhone 7/iOS 10
This is just a behavior that is going to happen on iOS when using fixed position elements. iOS safari will not re-render fixed position elements on scroll so you get some jank when focusing an input because the page is scrolling around.
You can somewhat get around this by adding transform: translate3d(0px, 0px, 0px) onto the modals styles, but it doesn't always work.
You can see the difference by changing position: fixed to position: absolute on the modal's styles. No more jumping around.
See here for an example: http://stackoverflow.com/questions/32875046/ios-9-safari-changing-an-element-to-fixed-position-while-scrolling-wont-paint
Any news please...
I don't know how to solve this in a react idiomatic way but I did in ember in what appears to be a related project, hope it helps @coder77 ember-modal-dialog/issues/154
Most helpful comment
This is just a behavior that is going to happen on iOS when using fixed position elements. iOS safari will not re-render fixed position elements on scroll so you get some jank when focusing an input because the page is scrolling around.
You can somewhat get around this by adding
transform: translate3d(0px, 0px, 0px)onto the modals styles, but it doesn't always work.You can see the difference by changing
position: fixedtoposition: absoluteon the modal's styles. No more jumping around.See here for an example: http://stackoverflow.com/questions/32875046/ios-9-safari-changing-an-element-to-fixed-position-while-scrolling-wont-paint