How can I stop our app from going behind the browser after it is brought to the front by a custom URL for our app

I have a custom URL (“insights-capture://”) that is used to open our app from a web page.

In our app, I listen to onAppLaunchTriggered and if the event.origin is urlscheme I bring our app to the front with overwolf.windows.bringToFront().

However, after the app is brought in front of the browser, the app window gets sent behind the browser after a brief moment.

This doesn’t looks like it is a browser issue since I can use a Steam browser protocol (“steam://nav/games”) to open up the Steam client to the games library and the Steam client doesn’t get sent behind the browser.

Is there something in our app that needs to be done to have the app stay in front of the browser after using a custom URL protocol to open it?

Hey @fgfl ,

Are you familiar with the topmost manifest flag and the bringToFront function?

Thanks

Hey @eransharv ,

I tried the topmost flag in the manifest, but that causes unwanted behaviour. The app window stays on top of everything forever until I minimize it once. Another window won’t be put on top when I focus it. The app window returns to normal behaviour once I minimize it once. I can put another window over the app again.

I tried adding the grabFocus option to the bringToFront call. That looks like it fixed the issue.

Thanks

1 Like