JordanMarr / fable-lit-fullstack-template

A SAFE-style template with Fable.Lit, Fable.Remoting and Giraffe
MIT License
58 stars 1 forks source link

Form template fires twice when submitted using enter key #7

Open leolorenzoluis opened 1 year ago

JordanMarr commented 1 year ago

Did you use e.preventDefault()?

<form @submit={Ev (fun e -> e.preventDefault(); save())}>

</form>
leolorenzoluis commented 1 year ago

Yes

JordanMarr commented 1 year ago

And you are using a <input type="submit"> button?

leolorenzoluis commented 1 year ago

Correct, I also tried what others said e.stopImmediatePropagation();