Skip to Main Content
Feature Request FR-4933
Product Area Page Components
Status CLOSED

1 Voters

Respect "Submit when Enter Pressed = No" for single-item pages

rode.mb Public
· Jun 19 2026

Description

The item attribute "Submit when Enter Pressed" currently does not behave as expected when a page contains only a single input item.

Even when the attribute is set to No, pressing Enter in the item still submits the page because the browser's default form submission behavior takes precedence.

This makes it difficult to implement custom Enter-key handling (e.g. Dynamic Actions, JavaScript events, custom search functionality) and forces developers to add JavaScript workarounds such as preventDefault().

Expected behavior

When Submit when Enter Pressed = No is configured, APEX should reliably prevent page submission triggered by the Enter key, regardless of how many items exist on the page.

Current workarounds

Developers currently have to use workarounds such as:

  • Adding custom JavaScript to intercept Enter and call preventDefault()
  • Creating a second dummy item and hiding it, only to prevent the browser from treating the page as a single-input form

Both workarounds are unintuitive and should not be necessary when a declarative attribute already exists.

Proposed enhancement

Ensure that Submit when Enter Pressed = No is fully respected, including on pages that contain only a single input item.

This would make the existing declarative setting behave consistently and eliminate the need for custom JavaScript in a common use case.

This request is likely a duplicate of FR-2978.

Comments

Comments

  • fac586 OP 37 hours ago

    Duplicate of FR-2978

  • fac586 OP 37 hours ago

    The item attribute "Submit when Enter Pressed" currently does not behave as expected when a page contains only a single input item.

    The page however does follow the behaviour required by the HTML specification for 30 years (APEX buttons don't count as "submit buttons" as defined in the spec):

    If the form has no submit button, then the implicit submission mechanism must do nothing if the form has more than one field that blocks implicit submission, and must submit the form element from the form element itself otherwise.