Orbeon表单-向导视图自动将第一个字段聚焦

问题描述

在我的表单中,我想使用向导视图。我注意到,当我更改节时,该节的第一个字段会自动聚焦。您可以在此处找到示例表格:https://demo.orbeon.com/demo/fr/orbeon/builder/edit/a82f35efaefb46cfba52ae2bb6ba1b5eec58c21d

是否可以禁用此功能

我认为此属性可以帮助您:https://doc.orbeon.com/configuration/properties/form-runner/form-runner-detail-page#focusable-controls

但是我不确定如何正确使用它。

解决方法

您正在寻找所需的oxf.fr.detail.initial-focus属性。您可以通过向您的properties-local.xml添加以下属性来禁用所描述的“初始焦点”行为。

<property
    as="xs:boolean"
    name="oxf.fr.detail.initial-focus.*.*"
    value="false"/>

如果您以前从未使用过属性,则可能要通过this page from the documentation on how to set properties