
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.
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.
Still jumps around but atleast it returns to the top now.
Nice post you have shared, which is very helpful for us. Thanks for sharing.
If some one needs expert view regarding blogging after that i advise him/her to pay a quick visit this website, Keep up the fastidious job. Carly Maxwell Straub