autosize
autosize copied to clipboard
iOS keypad overlapping fix
This fixes the bug on iOS with jumping scroll to the very top and keypad overlapping. Related to the issue #343
Thanks for the pull request. This fix is essentially the same as #344, but instead of removing the scroll-position restoration on all ancestor elements you excluded the specific element that had a overflow/scroll-position on your page.
I don't have any good answer for this, removing the scroll-position restoration is detrimental in other situations / browsers. For Autosize, I think the best thing to do is to exclude it for iOS users.
If the height calculation was handled in a different way, such as using an offscreen mirrored textarea element, then this issue could be avoided entirely. That would be a different project as it is a totally different and more complicated approach than what Autosize does.
It works in iOS 9 and 10. Just not 11 so disabling for just them seems reasonable.
Is the problem still there with iOS 12, 13 and 14 ? I don't have an iPhone to test and don't want to use autosize if it bugs for my iOS users. Thanks.