0

我正在使用 IE8 并在 Orbeon 3.9 CE 版 Sandbox 中运行表单。我观察到在 IE8 上显示字段中的内容时,时间输入字段有一个小问题。输入日期后,表单会格式化日期并添加a.mp.m结束,但整个信息只是覆盖在字段最右侧的时间图像上。请参阅下面的屏幕截图。

在此处输入图像描述

但是,在较低版本的 IE 上不会出现此问题。我在兼容性视图中启动了表单,但看不到问题。

在此处输入图像描述

此外,仅当我拥有自定义字体和大小时才会发生此问题。由于整个应用程序使用标准字体和大小,我也必须在 Orbeon 表单中使用它。

下面是示例代码

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
    xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >

    <xhtml:head>

        <style type="text/css">
            input {
                font-size: .95em;
                vertical-align:top;
                font-family: monospace !important;
            }
        </style>
        <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"
                xmlns:xs="http://www.w3.org/2001/XMLSchema" id="main-model" >

          <xforms:instance id="form-instance">
            <form>
              <field-1></field-1>
            </form>
          </xforms:instance>

          <xforms:bind id="field-1" nodeset="instance('form-instance')/field-1" type="xforms:time"/>

        </xforms:model>
    </xhtml:head>

    <xhtml:body>

      <table>
        <tr>
            <td>
                Enter Time: 
            </td>
            <td>
                <xforms:input bind="field-1" id="field-1-id" /> 
            </td>
        </tr>
      </table>

    </xhtml:body>
</xhtml:html>

在这段代码中,如果我们删除它工作正常的样式,但我应该使用它。因此,对于我已确定使用以下 css 的解决方法

.xforms-type-time { width:115px !important; }

那么,总而言之,Orbeon 表单引擎是否可以进行某种改进?

4

1 回答 1

0

By default, the width of the control is set to 8em. In my testing here, it does show wider with IE7 than IE8 and Chrome, but there is still enough space for the time with those browsers. If with your CSS the input gets too narrow, then you can override the default CSS to make it wider, as you suggested.

于 2012-10-31T21:55:15.290 回答