WebBrowserComponent and keyboard shortcuts

When our standalone app is started, we also show a second window containing WebBrowserConponent with things like news, special offers etc. (the “news” window).

The problem is that if a user presses CTLR(CMD)+N when this news window is open, it will open a default browser. This happens only on Windows, even if the news window is not focused or even minimised.

What we’d like, ideally, is to just perform whatever CTRL+N already does in the main app (opening a new project). In general, we’d like the secondary window to never handle any keyboard shortcuts and pass them all to the main window. For some reason this is already happening on Mac, but now on Windows.

I tried overriding WebBrowserConponent::newWindowAttemptingToLoad but looke like it’s never getting called; I also tried overriding keyPressed but it’s never called.

Does anyone have any thoughts on this?
Many thanks.

Which version of JUCE are you working with?

Is your WebBrowserComponent in a second child window, or is it in a frame of your main app window? I’ve used WebBrowserComponent in a Tabbed interface without encountering this issue - but note that there are differences in behaviour of this component between JUCE 7 and 8 …

Hey, thanks for replying.

For this project we’re still using JUCE 7 and the WebBrowserComponent is in its own child window (a juce::DocumentWindow).

Are you on JUCE 8?

EDIT: on Windows, even after closing the second window containing the WebBrowserComponent and making sure the main app window has focus, pressing CTRL+N will still open internet explorer!

Could this be a bug in the WebBrowserComponent Windows implementation? Everything looks fine on Mac.