Closed pdesoyres-cc closed 6 days ago
🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/fix-enter-key-on-inputs/index.html.
This preview will be deleted once this PR is closed.
🔎 The preview has been automatically deleted.
When the
Enter
key is typed, we ask for the underlying form to be submitted. It fails when the input is not into a<form>
element.This PR fixes that by requesting a form submit only if a
<form>
is attached to the input ElementInternals.How to review
Use Storybook and type
Enter
in either acc-input-text
,cc-input-date
, orcc-input-number
. Check for errors in the browser console.Only 1 reviewer is enough.