0

I am having a child window, and getting that window variable using window.open

But while getting that object, the child window comes into focus in Chrome. In case of IE10,11 it works correctly.

My requirement is I don't want the child window to come into focus while I call window.open

Samir Lakhani
  • 485
  • 6
  • 14

1 Answers1

0

use windowObj.blur() to force window to stay out of focus.

For e.g.:

var windowObj= window.open("http://stackoverflow.com");
windowObj.blur();  //To force the new window to stay OUT of focus.
//windowObj.focus();    //To force the new window to be IN focus.
SajjadHashmi
  • 3,795
  • 2
  • 19
  • 22
  • 1
    this is while opening for the first time. I am calling window.open to get the window object for already opened window. I tried calling window.blur after getting window object, but it is not working. – Samir Lakhani Nov 20 '13 at 11:50