Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon Button stopping click propagation #2859

Open
Licen-it opened this issue Apr 17, 2024 · 1 comment
Open

Icon Button stopping click propagation #2859

Licen-it opened this issue Apr 17, 2024 · 1 comment

Comments

@Licen-it
Copy link
Contributor

Licen-it commented Apr 17, 2024

Detailed description

Describe in detail the issue you're having.

The icon button is stopping the click event to bubble up the DOM structure. This is preventing other listeners to catch the action.
In my usecase i'm placing the button inside an anchor (<a>) to be able to use routerLink feature that is not supported by the button

Is this a feature request (new component, new icon), a bug, or a general issue?

bug

Is this issue related to a specific component?

Icon button

What did you expect to happen? What happened instead? What would you like to see changed?

the click should correctly bubble up across the DOM tree.

What browser are you working in?

any

What version of the Carbon Design System are you using?

latest

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Zelta

@Licen-it
Copy link
Contributor Author

I can see from the code this is done to avoid emitting the tooltipClick, but to be honest I have no idea how you could trigger just the tooltip click without triggering the button click....Is the tooltipClick really needed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant