smithy icon indicating copy to clipboard operation
smithy copied to clipboard

Bug: Cannot click on SVG

Open fxdave opened this issue 4 years ago • 1 comments
trafficstars

<svg on_click={|_| panic!("Oh yes")}>
   // ....
</svg>

Actual behavior: It doesn't panic

Expected behavior: It panics

fxdave avatar Mar 19 '21 23:03 fxdave

Oh interesting. I wonder why this is. Thank you for reporting this.

I don't currently have much time to look into these things, but I do remember there being issues with svg's.

Maybe you can work around this by wrapping your svg in a div, or adding position: relative to the svg? https://stackoverflow.com/questions/16502015/click-handler-on-svg-element

By the way, thank you for raising issues and trying the library! I hope it provides value for you, and I wish I was devoting more time to it.

rbalicki2 avatar Mar 27 '21 04:03 rbalicki2