On my site, I have an important notice that triggers my own alert () to bring the site to the forefront if the window is not already focused. The problem is that in some browsers, if the user is in another desktop application (Photoshop, Microsoft Word, etc.), he will not use the browser on top of this application. In this case, the warning is pretty much useless, and I would like to omit it (since it blocks other scripts on my page).
Is there any way to say that the browser is an active application on the device? Or is there another, non-blocking way to bring a window to the fore?
Thanks!
Explanations: I already know how to check if the window in the browser is active, but I just do not know how to check if the browser application is active. Also, the browsers I need for support are Chrome, Safari, Firefox, and IE> = 9
source share