So I have an input at the bottom of my page, positioned like so:
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 40px;
When I open the keyboard on iOS Safai, there is unwanted whitespace below the input. You can scroll up from it but it shouldn't be there.
The highlighting is from Safari Dev console, I've highlighted HTML, so the extra whitespace is not being caused by my HTML/CSS I think...
This does not happen on Android.
Any Help?
iOS safari does not respect position: fixed
when the input has focus. What seems to be happening is that the element's position attribute is changed to static
.
There are a couple aways around this, but the ultimate best answer for now would be to not use fixed
.
Additional reading: https://medium.com/@im_rahul/safari-and-position-fixed-978122be5f29
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With