Skip to content

fix(ui): make interactive icons inside badges clickable again#4827

Open
Siumauricio wants to merge 1 commit into
canaryfrom
fix/watchpath-remove-click
Open

fix(ui): make interactive icons inside badges clickable again#4827
Siumauricio wants to merge 1 commit into
canaryfrom
fix/watchpath-remove-click

Conversation

@Siumauricio

Copy link
Copy Markdown
Contributor

Since the Tailwind v4 / shadcn update (#4706), the badge base class includes [&>svg]:pointer-events-none. The watch-path badges render their remove X (lucide) as a direct svg child of Badge, so the icon's onClick never fired — watch paths could not be deleted in any of the git provider forms (application and compose variants). The remove handlers themselves are correct; the click just never reached them. Note that a plain pointer-events-auto on the icons would lose to the badge rule on specificity, which is why the rule itself is scoped.

Scope the badge rule to non-interactive icons: [&>svg:not(.cursor-pointer)]:pointer-events-none. All the removable-badge icons already carry cursor-pointer, so they become clickable again, while decorative badge icons keep passing events through. Verified the generated CSS with the project's Tailwind build.

Fixes #4780

The Tailwind v4 / shadcn badge update added [&>svg]:pointer-events-none
to the badge base class, which swallowed clicks on the X remove icons
rendered inside badges (watch paths in every git provider form), so
watch paths could no longer be deleted. Scope the rule to
non-interactive icons so svgs marked cursor-pointer receive clicks.

Fixes #4780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to delete a watchpath

1 participant