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
Child elements inside the <Button /> should be click-through #7034
Comments
I think it's a bug... Could you give us a PR to fix it? |
Sure, I will try to make a PR this week 👍 |
@benjycui I don't quite understand why the event target should always be set to the button element. The target of an event should be the element where the event originates. |
@jddxf exactly, when you click on a |
@mim-Armand Got your point. IMO, it may be better to provide a |
Version
2.12.3
Environment
MAC, Chrome 61,
Reproduction link
https://codepen.io/anon/pen/EvKmNO?editors=001
Steps to reproduce
Please looks at the console to inspect the behavior in the Codepen sample while clicking on the <button/>, the <i/> and the <span/> elements
What is expected?
The target property of the emitted event should always be the <button />
What is actually happening?
The event is triggered with the target set to other elements ( child elements )
Clicking on the text and / or icon in the button changes the target property of the event to the <span /> or <i /> elements instead of element
adding the rule
pointer-events: none
to the children solves the problem but that's just a suggestion as I wasn't sure if this is actually a bug or a feature..The text was updated successfully, but these errors were encountered: