Firefox why window.opener is defined even for a new tab

Posted by jonny on Stack Overflow See other posts from Stack Overflow or by jonny
Published on 2010-05-05T08:57:25Z Indexed on 2010/05/05 9:08 UTC
Read the original article Hit count: 250

Hi!

I am porting quite old corp application from IE to Firefox. Here is my situation.

User goes away from computer for a while and his session becomes expired.

When user tries to access something in popup, he is being redirected to login page (in popup window). In login page onload event popup window chain is being closed and root page refreshed (in root page tab user is redirected to login page).

The guy before me wrote this like this: if window.top.opener is undefined, we're not in popup. That's why I am getting non-stoppable refresh in Firefox.

Why in Firefox window.opener is still defined and points to same window, even if this is a new tab, not popup? How should I correctly determine that current window is popup?

© Stack Overflow or respective owner

Related posts about firefox3.6

Related posts about window.opener