ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(carousel): Prevent form submission from Carousel next/previous buttons

Open josephdburdick opened this issue 6 months ago • 1 comments

As described in issue https://github.com/shadcn-ui/ui/issues/2358, this fix applies type property to buttons with a default of "button" which prevents default form submission behavior when <button> resides within <form>.

josephdburdick avatar Jan 12 '24 03:01 josephdburdick

@josephdburdick is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 12 '24 03:01 vercel[bot]

I think it would be better to add a default value of "button" for type prop directly in the Button component so that this kind of issues will not happen with other components as well. IMHO it's also a good practice to be forced to explicitly set the type submit to submit buttons.

cluk3 avatar Mar 12 '24 12:03 cluk3

I think it would be better to add a default value of "button" for type prop directly in the Button component so that this kind of issues will not happen with other components as well. IMHO it's also a good practice to be forced to explicitly set the type submit to submit buttons.

I agree with this. I would try again to make a PR but I am unfamiliar with the process here, my last PR remained open and after a few weeks became out of sync.

josephdburdick avatar Apr 07 '24 21:04 josephdburdick