JavaScript opens the window in the background instead of foreground in Chrome and Safari
<p>I am using the below JavaScript function to open a new window when a user clicks on a link.</p>

<pre><code>function popWinSimple(url,features) {
    win = window.open(url,'',features);
    win.focus();
}
</code></pre>

<p>This function opens the window in the foreground  on Firefox but does not do the same on Safari and Chrome.</p>

<p>What may be the cause of this difference in behaviour?</p>
