When submitting a form, the event.target
is not the proper node.
#1544
Labels
bug
Something isn't working
event.target
is not the proper node.
#1544
Describe the bug
When submitting a form, the form element obtained via the
event.target
is different from the form element obtained viadocument.getElementById(formId)
ordocument.forms.namedItem(formId)
To Reproduce
This test should pass:
Expected behavior
Both nodes should be the same.
Additional context
This problem came up when using
conform-to/react
. In the source code of this library makes this comparison. While in the browser works well it fails if a try to test it.https://github.com/edmundhung/conform/blob/main/packages/conform-dom/form.ts#L784-L794
The text was updated successfully, but these errors were encountered: