Skip to content

[Bug Report][1.0.3] Button.Root hardcodes type="button" and doesn't accept a type prop #793

Description

@GentIeman

Environment

Vuetify0 Version: 1.0.3
Vue Version: 3.5.40
OS: Windows

Expected Behavior

Passing type="submit" to Button.Root should be forwarded to the rendered native <button> element, so the button can submit the surrounding <form>.

Actual Behavior

Button.Root has no type prop, and the rendered element always gets type="button". The type attribute is hardcoded in the root element attrs ("type": "button" when as === "button") and, being merged last in mergeProps, it overrides any type attribute passed by the consumer. The prop is also missing from ButtonRootProps, so it can't even be passed at the type level. As a result, a Button.Root inside a <form> never submits the form, and its DOM shows type="button".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions