简体   繁体   English

带有溢出的可滚动 div:隐藏在 FireFox 3.6.x 中

[英]Scrollable div with overflow:hidden in FireFox 3.6.x

On my web site I need to create custom vertical scrollbar.在我的 web 站点上,我需要创建自定义垂直滚动条。 There is div with some content.有一些内容的div。 Div has overflow:hidden (I need this for custom scrollbar). Div 有溢出:隐藏(我需要这个用于自定义滚动条)。

I have a table lays on this div.我在这个 div 上有一张桌子。 At start content size is less then div size.开始时内容大小小于 div 大小。

steps to reproduce:重现步骤:

  1. I add new row.我添加新行。 After that content size is over size of div.之后内容大小超过了 div 的大小。
  2. Then I scroll down to the end.然后我向下滚动到最后。
  3. Delete newly added row.删除新添加的行。

After that "table hides under top of div" in FF < 3.6.x.在 FF < 3.6.x 中的“表格隐藏在 div 的顶部”之后。

In other browsers all works fine also in FF > 3.6.x.在其他浏览器中,在 FF > 3.6.x 中也一切正常。

To fix this I reassign scrollTop for this div but it causes jumping.为了解决这个问题,我为这个 div 重新分配了 scrollTop,但它会导致跳跃。

See example on jsFiddle http://jsfiddle.net/nHuxT/14/请参阅 jsFiddle http://jsfiddle.net/nHuxT/14/上的示例

Are any solution to fix this issue?有什么解决方案可以解决这个问题吗?

Thanks谢谢

I can't add comment because of my reputation and can't send you any kind of private message, so I have to post it as an answer.由于我的声誉,我无法添加评论,也无法向您发送任何类型的私人消息,因此我必须将其发布为答案。 I've downloaded FF 3.6.x and checked your demo on jsFiddle - I clicked and looked at it and compared the results with FF5 and IE9 - I didn't notice any differences though.我已经下载了 FF 3.6.x 并在 jsFiddle 上检查了您的演示 - 我点击并查看了它并将结果与 FF5 和 IE9 进行了比较 - 我没有注意到任何差异。 I may not understand the bug you are talking about, but the demo you presented works fine on FF3.6, FF5 and IE9.我可能不明白你所说的错误,但你提供的演示在 FF3.6、FF5 和 IE9 上运行良好。

Since the demo doesn't have any divs you mentioned, maybe it would be better if you would provide us a demo with divs and everything else that makes the script buggy on FF 3.6?由于该演示没有您提到的任何 div,如果您向我们提供一个带有 div 的演示以及使脚本在 FF 3.6 上出现错误的所有其他内容,也许会更好?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM