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/12/02 14:03:46 UTC

[GitHub] turkimud removed a comment on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10

turkimud removed a comment on issue #417: Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10
URL: https://github.com/apache/cordova-ios/issues/417#issuecomment-443508754
 
 
   Use this code in device ready. This works for me.
   
   ```
   var inputYoffset = 0;
   $("input:not([type=submit]),textarea").on("focus",function (e) {
   	inputYoffset = window.pageYOffset;
   });
   $("input:not([type=submit]),textarea").on("blur",function (e) {
   	document.getElementsByTagName('html')[0].style.height = '101vh';
   	setTimeout(function() {
   		document.getElementsByTagName('html')[0].style.height = '100vh';
   		window.scrollTo(0, 0);
   		window.scrollTo(0, inputYoffset);
   	}, 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