When I create an svg rect with fill: black, my onclick event handler gets called.
When I replace the fill: black with fill: none, my event handler is NOT called when I click inside the rect, but only called when I click on the border of the rect.
What do I need to change so that click events are detected for clicking inside the rectangle?
This is controlled by the pointer-events property. Looks like you want to set it to visible
<rect pointer-events="visible" ...>