WebBrowserComponent always in front?

in one of my apps on both macos and ios i noticed that a ComboBox menu which overlaps a WebBrowserComponent will be hidden. i checked in the demo runner and there’s also weird behavior there with the WebBrowserDemo - the sidebar doesn’t slide over the demo window but instead resizes it.

this seems to occur in the various OpenGLDemo's as well as the VideoDemo. is this a known issue with components that are actually embedding native widgets or is there some workaround? i’ve tried toBack and toBehind but neither works.

1 Like

Hey @modosc, any update on this? I am trying to draw an ImageComponent in front of the WebBrowserComponent but JUCE doesn’t seem to be rendering it.

That’s not possible. Embedded components like OpenGL views or browser windows will always appear over the top of JUCE components.

1 Like

Thanks reuk! That’s a bummer :frowning: .

Let me ask you another quick question. Assuming I can send an information from the browser to the C++ layer saying that a drag started on the WebBrowserComponent, am I able to override the drag to be a performExternalDragDropOfFiles coming from the parent component, for example?

In other words, can I work around the browser drag and replace it with a JUCE component drag?

I don’t think there’s a way to get information about an ongoing drag out of the WebBrowserComponent, at least using the existing JUCE API. I think we are likely to investigate improvements in this area in future JUCE versions, but there’s no timeline for that work at the moment.

Could you not make a separate window for the JUCE components you want to be on top and put that above the window with the OpenGL context or browser?

1 Like

You could, yes.

That’s an interesting approach. I am pretty new to JUCE and haven’t played with multiple windows yet. Does this allow the user to interact with the window in the background? Any examples on how to implement this are appreciated.