I’m facing an issue with form submission when pressing the Enter key inside <s-text-field>.
When I type in the input and press Enter, the form does not submit. However, clicking the submit button works correctly.Here’s a minimal example:
<form onsubmit="handleSubmit(event)">
<s-text-field
label="Name"
name="name"
placeholder="Enter your name">
</s-text-field>
<s-button type="submit">Submit</s-button>
</form>
<script>
function handleSubmit(event) {
event.preventDefault();
alert("Form submitted!");
}
</script>
Steps to Reproduce:
-
Type inside the
<s-text-field>. -
Press the Enter key.
-
Form does not submit.
-
Click the submit button → form submits as expected.
Expected Behavior:
Pressing Enter inside <s-text-field> should trigger the form submit event, the same as clicking the submit button.