You can try adding a little delay to make sure the window is open.
win = window.open('/url/to/link','tab');
if(win)window.focus();
else{
var timer = window.setTimeout( function(){ if(win)win.focus(); }, 100 );
}
On this day, most people avoid pop-ups and use modal layers.
source
share