It is a difficult problem to get "right." You can try to hide the footer at the focus of the input element and show blur, but this is not always reliable on iOS. Every so often (once every ten, say, on my iPhone 4S), the focal event does not seem to fire (or maybe there is a race condition), and the footer is not hidden.
After much trial and error, I came up with this interesting solution:
<head> ...various JS and CSS imports... <script type="text/javascript"> document.write( '<style>#footer{visibility:hidden}@media(min-height:' + ($( window ).height() - 10) + 'px){#footer{visibility:visible}}</style>' ); </script> </head>
Essentially: use JavaScript to determine the height of the window of the device, and then dynamically create a multimedia CSS request to hide the footer when the window height is reduced by 10 pixels. Since opening the keyboard changes the size of the browser screen, this is never interrupted in iOS. Since it uses the CSS engine, not JavaScript, it is much faster and smoother!
Note. I found that "visibility: hidden" is less buggy than "display: none" or "position: static", but your mileage may vary.
source share