How to pass the click that focuses an Electron window to its content

I’ve written a small app that displays lines with a particular attribute from various source code files. When I click a line, it opens my IDE on the corresponding line of the file. That all works fine.

However, once the IDE has focus, if I click another line in the Electron app, all that does is give the focus back to the app. What I’d like to do is also have the click event passed to the app.

In other words, if I’ve clicked one line and that has focussed the IDE, I’d like to be able to click another line in my app and have it take me straight back to the IDE again.

At the moment, I need one click to focus the Electron app and then another click to choose a new line. Obviously, that makes for a less than optimal user experience.

Apologies if this is an OS issue, rather than an Electron thing. In case it’s important, the target systems are MacOS and Windows.