While the Samuel's response should fix the problem, it will create other side effects. For example in Phonegap 3.3 adding height=device-height to viewport, you would get scroll in every screens (even when the elements on the page are not big enough to full the screen). In our case the only solution ,found here, was add a notification handler to the open keyboard on Phonegap which calls to a javascript function, and then hide the fixed footer on this function, besides hide/show the footer again in focus/blur functions. An example using jquery mobile is attached, but you could update it to use a different framework:
On javascript:
$(document).on('focus','input, select, textarea',function() {
if( device.platform=== 'iOS' && parseInt(device.version.substring(0,1)) >= 7){
if($(this).attr('readonly')===undefined){
$("[data-role=footer]").hide();
}
}
});
$(document).on('blur','input, select, textarea',function(){
if( device.platform=== 'iOS' && parseInt(device.version.substring(0,1)) >= 7){
if($(this).attr('readonly')===undefined){
$("[data-role=footer]").show();
}
}
setTimeout(function() {
window.scrollTo(document.body.scrollLeft, document.body.scrollTop);
}, 0);
});
function hideFooter(){
if( device.platform=== 'iOS' && parseInt(device.version.substring(0,1)) >= 7){
if($(this).attr('readonly')===undefined) {
$("[data-role=footer]").hide();
}
}
}
And in phonegap MainViewController.m:
- (id)init
{
self = [super init];
if (self) {
// Uncomment to override the CDVCommandDelegateImpl used
// _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
// Uncomment to override the CDVCommandQueue used
// _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
}
//fix for ios7 footer is scrolled up when the keyboard popsup.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
return self;
}
-(void)keyboardWillShow:(NSNotification*)notification{
if (IsAtLeastiOSVersion(@"7.0")){
[self.webView stringByEvaluatingJavaScriptFromString:@"hideFooter()"];
}
}