Fixed header and footer issue on iOS device

Fixed header and footer issue on iOS device
When you scroll the page and dismiss the keyboard while the page still scrolls, the header does not return to its fixed position. If you tap a link or button, the header shows up somewhere in the (vertical) middle of the screen and only returns to its fixed position after manually scrolling.Solution:
if( /iPhone|iPod|iPad/i.test(navigator.userAgent) ) {
$(document).on(‘focus’, ‘input, textarea’, function()
{
$(‘header’).css(“position”, ‘absolute’);
$(‘footer’).css(“position”, ‘absolute’);

});
$(document).on(‘blur’, ‘input, textarea’, function()
{
$(‘header’).css(“position”, ‘fixed’);
$(‘footer’).css(“position”, ‘fixed’);
});
}
The above “unfixes” the header/footer while an input field is focused.

Join the Conversation

3 Comments

  1. I ADAMS KEVIN, a representative Aiico Insurance plc, we trust and respect for individual differences in day out a loan. We will provide 2% of the loan's interest rate. If you are interested in this business contact us by e-mail: (adams.credi@gmail.com) now transfer their loan documents issued properly. Do you need a loan to set up business or school if you are very welcome to Aiico Insurance plc. You can also contact us by e-mail: (adams.credi@gmail.com). We first week can request a balance transfer.

    DO YOU NEED LOAN FOR PERSONAL BUSINESS? IF YOU CONTACT YOUR EMAIL ABOVE TO PROCEED WITH YOUR LOAN TRANSFER IMMEDIATELY OK.

Leave a comment

Your email address will not be published. Required fields are marked *