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 2018/11/14 14:35:46 UTC

[GitHub] thepianist2 commented on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10

thepianist2 commented on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10
URL: https://github.com/apache/cordova-ios/issues/417#issuecomment-438682821
 
 
   My solution was use a plugin or any thing to detect the event on keyboard native hide, and on this moment execute script to normalize the height of the app.
   
   
   ```
   //install the plugin
   cordova plugin add cordova-plugin-keyboard
   
   //on the .js file detect the event and apply the normal height in the event the keyboard will hide.
   window.addEventListener('keyboardWillHide', function () {
     document.getElementsByTagName('html')[0].style.height = '101vh';
     setTimeout(()=>{
       document.getElementsByTagName('html')[0].style.height = '100vh';
     }, 40);
   });
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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