Skip to content

Button with asChild and disabled still allows interaction on non-button elements #796

@hassanaitnacer

Description

@hassanaitnacer

When a button is used with asChild and the child is a non-button element (<a>) disabled/data-disabled correctly set the right styles but click/keyboard interactions can still fire. It looks visually disabled but remains interactive. Could the button also block events for asChild elements to match native button disabled semantics?

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