Im doing something like:
<button type="button" onClick={this.toggle}>
{this.props.label}
</button>
If this.props.label
is a div, span or some text, clicking on it triggers this.toggle
. However, if this.props.label
is an svg then onClick
never gets triggered.
Do you have a repro? (jsfiddle?)
I can't repro this:
I had the same problem. A little CSS solved it for me:
svg {
pointer-events: none;
}
@mattweb +1
Most helpful comment
I had the same problem. A little CSS solved it for me: