溢出-y不能在模态内的safari中工作 [英] overflow-y not working in safari inside a modal

查看:84
本文介绍了溢出-y不能在模态内的safari中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定这里是html:

 < div style =height:200px; position:relative; ID = filterOptionsContainer > 
< table id =filterOptionsTableclass =table table-striped table-hover>
< / table>
< / div>

基本上,我向表中动态添加行,我希望容器滚动溢出。首先,我尝试了一下很明显的例子:

  #filterOptionsContainer {
overflow-y:auto;
}

,除了ios移动设备上的Safari之外,

从那以后,我花了几个小时尝试每种可以考虑和阅读的样式组合,但我无法获得标准的溢出滚动。我得到的最接近的是滚动条显示(它实际上并没有滚动)。

所有帮助表示赞赏。我很难相信它不可能在Safari中以模式滚动div的内容......

编辑:仍然在这个问题上。我需要解决它。

解决方案

我通过在移动设备上切换到多重选择(并隐藏可滚动div)解决了这个问题(所以没有真正的解决方案)。谢谢各位的帮助。

编辑:我终于明白了这一点。基本上发生的事情是,当我改用multiselect之后,它在使用Safari时在IOS设备中也出现了奇怪的现象。



在进一步检查我的同事注意到dojo touch在可滚动的div和多选(我使用的模板使用dojo)上的事件。我开始环顾模板的源代码,找出为什么这些事件被附加到所有这些元素上,并且我注意到一个名为dojo / touch的dojo模块。从项目中删除该模块后,Safari中的元素仍然可以正常工作。



丢失的是'dojo / touch'和IOS Safari完全不兼容。 p>

Ok here is the html:

<div style="height: 200px; position: relative;"  id="filterOptionsContainer">
                <table id="filterOptionsTable" class="table table-striped table-hover">
                </table>
            </div>

Basically, I am dynamically adding rows to the table and I would like the container to scroll the overflow. First I tried the obvious:

#filterOptionsContainer {
overflow-y: auto;
}

and that works fine everywhere except for Safari on ios mobile devices.

Since then I have spent hours trying every combination of styles I can think of and read about but I cannot get standard overflow scrolling. The closest I got was getting the scrollbar to show (it wasn't actually scrolling though).

All help is appreciated. It is hard for me to believe that it is not possible to scroll the contents of a div in a modal in Safari...

Edit: Still on this issue. I need to get it solved.

解决方案

I resolved this by switching to a multiselect (and hiding the scrollable div) on mobile devices (so no real solution). Thanks for all the help everyone.

Edit: I have finally figured this out. Basically what happened was that after I switched to using a multiselect, it too was acting weirdly in IOS devices when using Safari.

In examining further a colleague of mine noticed dojo touch events on both the scrollable div and on the multiselect (the template I am using uses dojo). I started looking around in the template's source to figure out why these events were being attached to all these elements and I noticed a dojo module called "dojo/touch". After removing this module from the project, the elements are working fine in Safari.

The take away is that 'dojo/touch' and IOS Safari are totally incompatible.

这篇关于溢出-y不能在模态内的safari中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆