title: window.open appearing behind webkit browsers, but not if I open a facebook or twitter page?
body: <p>I am using window.open() to open </p>
  
  <p><a href="http://twitter.com/share" rel="nofollow">http://twitter.com/share</a>.. and 
  <a href="http://www.facebook.com/sharer.php" rel="nofollow">http://www.facebook.com/sharer.php</a>...</p>
  
  <p>to allow the user to post to their Facebook or Twitter accounts.</p>
  
  <p>These popup windows appear correctly infront of my current Chrome or Safari windows.</p>
  
  <p>However when I change the URL to another page on my current domain the popup window appears behind the current window instead of infront!? Same code, same function to open the window, just a different URL being passed to window.open().</p>
  
  <p>I can't figure out why, I've tried everything, commenting out any javascript in the popup page or anything that might cause Chrome/Safari to think it's malicious.</p>
  
  <p>Do these browsers detect the URL as being Facebook/Twitter and allow it to appear in front, and shove anything else to the back?</p>
  
  <p>This is my function for opening the window</p>
  
  <pre><code>InfoOverlay.prototype.popupWindow = function(url, title, width, height) 
  {
      var left = (screen.width/2) - (width/2);
      var top = (screen.height/2) - (height/2);
      var targetWin = window.open(
          url, 
          title, 
          'toolbar=no, location=no, directories=no, alwaysRaised=yes, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left
      );
  
      // These 2 lines added on suggestion from commenter below 
      // (doesn't fix issue)
      targetWin.blur();
      targetWin.focus();
  }
  </code></pre>