Some browsers, particularly on mobile, disable the window focus() functionality for existing windows. Can you detect when this will happen, without browser sniffing? By using feature detection?
focus()
My problem is that I have a button that executes
popup.focus();
If this function won't do anything, I want to hide the button. I can do that by checking screen size or browser sniffing but I would like a more elegant and robust solution.
1.4m articles
1.4m replys
5 comments
57.0k users