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

[ListItem] ListItemSecondaryAction onClick event has bubbling effect #17071

Closed
xu3u4 opened this issue Aug 20, 2019 · 1 comment
Closed

[ListItem] ListItemSecondaryAction onClick event has bubbling effect #17071

xu3u4 opened this issue Aug 20, 2019 · 1 comment
Labels
component: list This is the name of the generic UI component, not the React module!

Comments

@xu3u4
Copy link

xu3u4 commented Aug 20, 2019

I think it is both a bug and a question.

When I make a separated component for ListItemSecondaryAction, the click event bubbles up. https://codesandbox.io/s/bcerz

But if ListItemSecondaryAction is contained inside ListItem directly, it doesn't have bubbling effect. https://codesandbox.io/s/ohev6

please open the console panel

Either without or with bubbling works for me, I can add event.stopPropagation by myself.
But I am quite curious why the second case doesn't have bubbling effect.

@oliviertassinari
Copy link
Member

It's not a strictly a bug, it's the result of the underlying DOM structure, see #13597 for an exploration of a better solution.

@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2022
@zannager zannager added the component: list This is the name of the generic UI component, not the React module! label Dec 20, 2022
@zannager zannager removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: list This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants