addEventlistner is not working with trackball-controls on canvas

I am calling a function on click event on canvas but due to trackball-controls it is not listening event.

When I remove trackball-controls it is working as expected.

Please help me this

Try to add the event listener to the pointerdown event.

Thank you @Mugen87