You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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 @Coder77ember-modal-dialog/issues/154
Summary:
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.
Steps to reproduce:
Expected behavior:
Focus the field without scrolling/flying.
Additional notes:
Tested on iPhone 5S/iOS 9.3.5 and iPhone 7/iOS 10
The text was updated successfully, but these errors were encountered: