我有一个模式,我在 Bootbox 中打开(使用最新的 Bootstrap 3.3.0)。代码非常简单:
$(document).on("click",".open-info-modal", function() {
if (is_scrolling == false) {
var the_el = JSON.parse( localStorage.getItem("notification"+$(this).attr('rel')) );
var the_html = Mustache.to_html($('#leadPopupTemplate').html(), the_el);
bootbox.alert(the_html,function() { });
$('#the_message').css('height',$(window).height() - 150);
}
});
但是,在 iOS 8 上(在我的 iPad 上),滚动条无法在 #the_message 上正常工作。烦人的是,它有时确实如此。您必须单击模式,然后再次单击以开始尝试滚动。
正文中添加了 .modal-open 没问题,所以这不是问题所在。烦人的是,它适用于除 iOS8 之外的所有系统! (没有旧版本的 iOS 可以测试,所以我无法检查它是否适用于以前的 iOS 版本)。
更新: 好吧,我放弃了——我花了无数个小时试图让它工作,现在只希望我早点看过第 3 方“jquery 插件”。最终使用了它,它解决了我所有的问题 - http://manos.malihu.gr/jquery-custom-content-scroller
最佳答案
在iOS中尝试多指手势实现滚动。有时会出现此问题。
关于jquery - iOS 8 - 模式不会让你滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26842998/