Javascript blur () in IE8 on Vista not working

I have a project that issues a message box for the user. It is displayed for 10 seconds and then sent to the background using the javascript command self.blur(). I do not want to close it, because it has information that the user may need to see agian.

It currently works for IE7 / IE8 / FF2 / FF3 on Windows XP, but in Vista it does not work for IE8. I found that if I disable Protected Mode for IE8 in Vista, the command blur()works, and the window correctly returns focus to the parent window.

Does anyone know exactly why this is happening and what can be done to get around this? Any help would be greatly appreciated!

+3
source share
1 answer

How do you write out the window? What is the original source of the window - about:blank? It can make a difference. In addition, if you are downloading a web page from a local host, try starting it from a "real" domain.

And suggestion: try a lightbox or some other form of the "DHTML" layer. They are very easy to create using the various libraries available today; Not only will this tactic deal with the problem you are experiencing, it will improve your experience. Probably a bigger change than you would like, but much better in the long run.

+3
source

Source: https://habr.com/ru/post/1707816/


All Articles