Dialog.Close not of type="button" (Treated as submit in forms) #1557
mmailaender
started this conversation in
Feature Requests / Ideas
Replies: 1 comment
-
This would be a breaking change and is something that can be considered for v3 but won't be considered at this moment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Radix Dialog.Close button is from type="button" in comparison to Bits Dialog.Close which is relevant in context of forms, as if it's not specified it's treated as submit which is not the expected outcome.
Radix: https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/src/dialog.tsx#L481C9-L481C22
Bits: https://github.com/huntabyte/bits-ui/blob/main/packages/bits-ui/src/lib/bits/dialog/components/dialog-close.svelte#L34
Suggested change:
Before
After:
Severity
annoyance
Beta Was this translation helpful? Give feedback.
All reactions