You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/14 16:16:12 UTC

[GitHub] [cordova-ios] lptnmachine edited a comment on issue #472: iOS 12 / UIWebView Keyboard covers INPUT elements at the bottom of page

lptnmachine edited a comment on issue #472: iOS 12 / UIWebView Keyboard covers INPUT elements at the bottom of page
URL: https://github.com/apache/cordova-ios/issues/472#issuecomment-471988534
 
 
   Since Apple apparently isn't hurrying to fix this (if they ever will), here's a workaround that works for us and might work for you:
   
   First, the problem only seems to occur if you added `viewport-fit=cover` to your meta-tag. Since that's needed to support the notch removing that isn't really an option; the workaround that worked for us was using the [cordova-keyboard-plugin](https://www.npmjs.com/package/cordova-plugin-keyboard) and setting the `shrinkView `option to `true`. This WILL change some behaviour on opening and closing the keyboard, so you should definitely check if the rest of your application still works as intended if you try this.
   
   This mostly got rid of the problem for us - except for cases where the page was shorter than the viewport. This might just be a side effect on how we handle overlays in our project, but on opening the keyboard there's some black space added to the bottom of the site. We worked around that by using JS to set the `min-height` of the `html `element to the pixel value of the viewport height (instead of `100vh`, in our case). Again, this changes some behaviour, especially with scrolling on keyboard opening, but most of that can easily be mitigated with a few lines of JS and the events that the Keyboard plugin makes available.
   It's not perfect, but it's far better than any other solution I found.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org