DisclosurePanel样式bug?

时间:2013-06-24 12:03:53

标签: gwt uibinder

这是我的问题:当我导航到下面显示的视图时,披露面板与网格的距离很远,当我点击一个披露面板标题时,它会得到一个“选择边框” - 但是当我刷新浏览器时,一切它位于应该的位置,当我点击它时,揭示面板标题不再被选中。 我有一个像这样的ui.xml:

<g:HTMLPanel>
    <g:VerticalPanel>
        <g:Grid>
            <g:row>
                <g:customCell>
                    <g:Button ui:field="editBTN" width="50px"></g:Button>
                </g:customCell>
                <g:customCell>
                    <g:Button ui:field="deleteBTN" width="50px"></g:Button>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="date" width="100px"></g:Label>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="begin" width="100px"></g:Label>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="end" width="100px"></g:Label>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="pause" width="100px"></g:Label>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="sum" width="100px"></g:Label>
                </g:customCell>
                <g:customCell>
                    <g:Label ui:field="tasks" width="100px"></g:Label>
                </g:customCell>
            </g:row>
        </g:Grid>       


            <g:DisclosurePanel>
                <g:header>test</g:header>
            </g:DisclosurePanel>
            <g:DisclosurePanel>
                <g:header>test</g:header>
                <g:Grid>
                <g:row>
                    <g:customCell>
                        <g:TextBox ui:field="fromDATEtbx" width="100px"></g:TextBox>
                    </g:customCell>
                    <g:customCell>
                        <g:TextBox ui:field="toDATEtbx" width="100px"></g:TextBox>
                    </g:customCell>
                </g:row>
            </g:Grid>       
            </g:DisclosurePanel>
    </g:VerticalPanel>
</g:HTMLPanel>

这是一个已知的错误/错误吗?

2 个答案:

答案 0 :(得分:0)

我在调试模式下工作时,有时会注意到这个“选择边框”。但是在生产模式中没有看到这一点。

如果您真的需要通过各种方式摆脱这种影响,可以尝试将“outline: none;”设置为disclosurePanel.getHeader().getParent(),这样会阻止显示突出显示的边框(通常可以显示活动状态)用于包含公开面板标题的<a href=...>元素的新浏览器中的焦点元素。

当您看到元素之间的意外空间时,您还可以检查devtools中该标题的内容。并将其与刷新后的内容进行比较。所以你可能会注意到差异,然后找出导致这种差异的原因。

答案 1 :(得分:0)

好的解决了问题。 不知怎的,它增加了

td { padding: 8px; }

你的造型。我只是设置

td { padding: 0px; }

到我的uibinder。

相关问题