tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.02k stars 1.03k forks source link

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

Open SimeonGriggs opened 4 days ago

SimeonGriggs commented 4 days ago

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.