Skip to content

Text input with "allow multiple lines" doesn't allow newlines with return/enter key #1592

@lindsayevans-unsw

Description

@lindsayevans-unsw

Expected Behaviour

Pressing the return or enter key inside a multi-line text input should create a new line

Actual Behaviour

Cursor stays on the same line

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Add a text input to the form
  2. Select the "allow multiple lines" checkbox in the configuration dialog
  3. Preview form
  4. Type anything into text input, then press return/enter

Platform and Version

core.forms.components.version: 3.0.70
Core Form Components: 1.1.32

AEM Version (mention the exact version in case of cloud SDK)

Adobe Experience Manager 2025.3.20133.20250325T063357Z-250300

AEM Forms Version

Adobe Experience Manager Forms 2025.03.13.02-250300

Sample Code that illustrates the problem

Logs taken while reproducing problem

Seems to be caused by this line in FormContainer#preventDefaultSubmit():

if (event.key === 'Enter' && target.tagName !== 'SELECT' && target.tagName !== 'BUTTON' && !isSubmitOrReset) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions