headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

<Switch> does not submit form with type="submit"

Open SimeonGriggs opened this issue 1 year ago • 0 comments

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.1.1

What browser are you using?

Arc (Chrome)

Reproduction URL CodeSandbox:

Describe your issue

When using <Switch type="submit"> clicking the button changes the current setting but does not submit the form. In the reproduction above the form submits with a normal button, and with a button that has the role="switch", but the <Switch> component does not.

SimeonGriggs avatar Jun 28 '24 14:06 SimeonGriggs