0

I am using a dijit/layout/TabContainer with two tabs. I create them like this:

<div dojoType="dijit.layout.TabContainer" doLayout="false">
    <div dojoType="dijit.layout.ContentPane" title="First tab" style="background-color:rgb(237,240,246)" doLayout="false"> Some dynamic content here </div>
    <div dojoType="dijit.layout.ContentPane" title="Second tab" style="background-   color:rgb(237,240,246)" doLayout="false"> Some dynamic content here </div>
</div>

This works fine for Firefox, Chrome and IE9, but doesn't render properly on ipad with Safari. The first time the first tab displays correctly, but then it takes the width of the second tab, which is larger. I believe that this should not happen as I have added the doLayout flag. I don't know if it matters, but I am using dojo with xpages framework.

Thanks a lot in advance!

4

1 回答 1

1

我添加了

controllerWidget="dijit.layout.TabController"

到 TabContainer 的 div 以及百分比宽度,现在它也在 Safari 中正确显示。

问题是 Safari 需要定义一个宽度。但由于我的内容是动态的,我无法以像素为单位定义固定宽度。因此,为了使用百分比宽度,我还必须添加上面的标志。我不知道这是否是实现此目标的适当方法,但它解决了我的问题。

于 2013-04-23T08:00:25.927 回答