ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
192 stars 177 forks source link

White space above keyboard #96

Closed haveamission closed 5 years ago

haveamission commented 5 years ago

I am noticing that there is some white space above the keyboard at all points on iOS.

There is no white space underneath my div (above keyboard) before the keyboard fires.

JensWinkler69 commented 5 years ago

Same issue here. Works fine if I try it with the Ionic Dev App (On Device)

But after building it with Xcode on the device, the white space appears. IMG_0012

haveamission commented 5 years ago

So a partial solution I've found for my use-case is that it seems to be related to VH.

I set my div for my input to have top: 87vh or so, and that seems to do the job, though imperfectly.

I suspect it's related to vh due to this though

Mapiac commented 5 years ago

Also see this. AdjustPan maybe?

haveamission commented 5 years ago

Can you use AdjustPan with iOS? All the examples I am seeing are with Android

haveamission commented 5 years ago

Ok, I have a better solution ultimately.

Give your input div a set height (in my case, 5em).

Set top to calc(100vh - 5em)

Works perfectly. Add a minor transition speed to make it look more natural.

diegodotta commented 5 years ago

Have you tried <preference name="KeyboardResizeMode" value="body" /> or <div keyboard-attach> ?

Kind of solve some weird interface issues here. But also can generate other issues. :/

jcesarmobile commented 5 years ago

Closing as I can't reproduce and looks like it was a CSS issue. If you think it's not really fixed, please, create a new issue and provide more information, with a sample app where it can easily reproduced.