Fix “Position Fixed” in Phonegap IOS App

When I build a Phonegap App on IOS that has header and footer with “position fixed”. Everything works well on web version, and I start to test IOS app version, it seems work well too. But a problem orcurs when virtual keyboard opens and close, then the layout breaks (“position fixed”  of header and footer does not work). I took 2 hours to research and google. Finally, I work out a solution, it is quite simple. I just set “position static” for header footer when virtual keyboard close (input blur event) and set  a time out about 200 miliseconds to change back “position fixed”, the layout will be perfect again. The below is my code, you will be easy to understand it if you ever work with angularjs, coffeescript