Click event doesn't fire after drawing a shape using mode bar

I’m having this problem which I’ve not found an answer yet. My app handle click event fine if there’s no user drawing on the figure. As soon as I draw any shape, that event wouldn’t fire anymore. Erasing all shapes doesn’t help.

How can I work around this?

Hi @uzimaster could you create a minimal running example for us to check?

Sorry, while creating the example, I figured this out by myself. It seems that Plotly only fire click event when the current tool is Zoom or Pan. I selected a shape tool to draw but then forgot to select back Zoom or Pan. That’s why the click event wouldn’t fire.

Anyway, here is the link for the example: GitHub - tariusagi/plotly-dash-lab: A repo for experimenting with Plotly and Dash. Run “python click-test.py”

1 Like

Hmm,

I think this is actually adjustable, but not entirely sure.

There is a setting where you can pass click+event.

Thanks. I will try that.