Tapping is not the same as clicking, the reason for the problem is that the content gets the focus after the scroll and tapping on navigation actually taps behind it... weird, I know.
One of the fixes that worked for my position fixed element was to make it position relative after the scroll and put it back to fixed. This seems to does the trick and gets the fixed element in focus again.
Here's the code
Code:
$('.navigation-link').bind('click', function(e) {
// The internal element to which to scroll to. (getting it from the anchor's href which is the elements ID)
var topScrollTarget = $(this.hash).offset().top;
$('html,body').animate({
scrollTop: topScrollTarget
}, 500, function() {
// Header (html5) is my fixed element
$('header').css({ 'position': 'relative' });
window.scroll(0, topScrollTarget);
$('header').css({ 'position': 'fixed' });
});
});
Bookmarks