Tôi có cùng một vấn đề và giải pháp phát hiện ra rằng thực sự giải quyết vấn đề này:
if(navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
$('.modal').on('show.bs.modal', function() {
// Position modal absolute and bump it down to the scrollPosition
$(this)
.css({
position: 'absolute',
marginTop: $(window).scrollTop() + 'px',
bottom: 'auto'
});
// Position backdrop absolute and make it span the entire page
//
// Also dirty, but we need to tap into the backdrop after Boostrap
// positions it but before transitions finish.
//
setTimeout(function() {
$('.modal-backdrop').css({
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
) + 'px'
});
}, 0);
});
}
Hy vọng điều này sẽ rất hữu ích cho những người khác sẽ có cùng một vấn đề.
Có vẻ như điều này là do lỗi trong Mobile Safari. Bạn có thể làm theo các vấn đề mở trên Github [ở đây] (https://github.com/twbs/bootstrap/issues/14975). –
Vui lòng đính kèm trường hợp kiểm tra với sự cố của bạn (http://jsfiddle.net). –