It's a well known bug on Safari, both on iPad and iPhone.
A workaround it's to change the position to absolute to all elements set with fixed position.
In case you are using Modernizr you could also target mobile devices this way:
jQuery code
$(document).ready(function() {
if (Modernizr.touch) {
$(document)
.on('focus', 'input', function(e) {
$('body').addClass('fixfixed');
})
.on('blur', 'input', function(e) {
$('body').removeClass('fixfixed');
});
}
});
CSS
If I want to target just the header and footer for example, that are set with fixed position, when the class 'fixfixed' is added to the body I can change the position to absolute to all elements with fixed position.
.fixfixed header, .fixfixed footer {
position: absolute;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…