如何禁用Orbeon Forms Wizard View切换区段时自动聚焦首个字段?
Disabling Auto-Focus on Wizard Section Switch in Orbeon Forms
Great callout—you’re exactly right about using the oxf.fr.detail.focusable-controls property to control this behavior. Here’s how to configure it properly to disable auto-focus when switching wizard sections:
How to Disable Auto-Focus
This property accepts a CSS selector that determines which controls are eligible to receive focus when entering a section. To completely turn off auto-focus for wizard section switches, set it to an empty string.
Configuration Examples
You can apply this setting globally, to a specific app, or to a single form:
Global setting (all forms):
Add this to yourproperties-local.xmlfile:<property as="xs:string" name="oxf.fr.detail.focusable-controls" value=""/>Target a specific app:
<property as="xs:string" name="oxf.fr.detail.focusable-controls.my-app.*" value=""/>Target a single form:
<property as="xs:string" name="oxf.fr.detail.focusable-controls.my-app.my-form" value=""/>
Key Notes
- The
properties-local.xmlfile is typically located inWEB-INF/resources/config/of your Orbeon deployment. - If you later want to re-enable focus for specific controls (but not the first in the section), you can update the value to a more specific CSS selector (e.g.,
input[type="text"].special-focus). But for your use case, the empty string will fully disable the auto-focus behavior when switching wizard sections.
内容的提问来源于stack exchange,提问作者m.makos
相关产品推荐
相关产品推荐

