Show hidden content under iOS 15 address bar when keyboard is active
Asked Answered
C

1

7

iOS 15 leads to content being hidden under the address bar when the virtual keyboard is active. A bug report can be found here. To see the problem, run the snippet in full size on an iPhone with iOS 15 with the address bar on the bottom and press the input field. Alternatively check out this codepen

How can I show the input field when the keyboard is active? I've tried setting padding to safe-area-inset-bottom with no luck.

.container {
  display: flex;
  height: 100vh;
}
.input-bottom {
  align-self: flex-end;
}
<div class="container">
  <div class="input-bottom">
    <input /><button>Post</button>
  </div>
</div>
Cristencristi answered 28/9, 2021 at 13:25 Comment(1)
This is still an issue for me. I've also tried env() but it does not work. I'm having to manually add margin to the input field.Spicebush
C
1

The bug is now fixed in iOS 15.1

Cristencristi answered 25/11, 2021 at 11:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.