Closed stevenliebregt closed 2 years ago
Hmmm, I'm testing this code locally and it's the presence of the tag (the link) that's interrupting the onsubmit. If I remove the Link component the form submits properly. Does it have something to do with how HTML forms work? I know buttons in forms take on the submit role by default by some configurations can prevent that default from kicking in.
Edit:
seems to be an issue on the Dioxus side of things
it might be the tag interrupting the parsing of the forms field.
EDIT:
Digging into this a bit more, there's actually an issue with how Dioxus chooses to pass events into the virtualdom.
@stevenliebregt Can you see if #310 fixes this setup for you? Took a little while to figure it out and I'm sure there are more edge cases to catch.
Yeah that one fixes it
Problem
When using a router and a separate function (Component?) with a form in it, the
onsubmit
is never called.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the onsubmit to be called even if the form is in a separate function.
Screenshots
Not applicable
Environment:
Questionnaire