Closed Bug 123647 Opened 23 years ago Closed 23 years ago

Popup window appears even when "open unrequested windows" is unchecked

Categories

(SeaMonkey :: Preferences, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 126224

People

(Reporter: sharding, Assigned: samir_bugzilla)

References

()

Details

I went to http://www.eonline.com/ with Linux 0.9.8 (2002020415) and I got an
automatic popup, despite the fact that I have "open unrequested windows"
unchecked in Prefs->Advanced->Scripts & Windows. I'm not sure how they've done
this; all I see in the source are a couple of standard window.open() calls. But
I might be missing something. In any case, this is annoying.
If the preference is UNchecked then it doesn't apply.

I got it checked and no window has opened for me. Build 2002020206, win98
Uhhh...

By the wording of the prefs dialog (I'm reading it right this second), checked
means "allow scripts to: open unrequested windows." Therefore, if the preference
is unchecked, scripts should NOT be allowed to open unrequested windows. Why you
didn't get the popup, I don't know, but I disagree with your interpretation of
the preferences.

Note that if you've been to this page before, you won't get the popup again 
because they set a cookie ("etv") to make sure you only get it once. Here's the
javascript code that launches this popup:



<script type="text/javascript" language="javascript">
<!--
// Open a new window
function etv(url){
popupWin =
window.open(url,'etvwindow','width=350,height=320,scrollbars=no,top=10,left=280')
}
// -->
</script>
    
[snip]

function readCookie(Name) {
          var cookies = ' ' + document.cookie;
        if (cookies.indexOf(' ' + Name + '=') == -1) {
                document.write("<img src='/Images/white.space.gif' height=2
width=2 border=0 hspace=0 vspace=0 align=left onLoad=etv('/Popup/Fd/index.htm
l')>")
                } else {
                document.write("&nbsp;")
                }
}
// --&gt;
</SCRIPT>
[snip]
<!-- COMMENT THIS SCRIPT OUT TO TURN OFF THE POPUP -->
<SCRIPT language="JavaScript">readCookie('etv')
</SCRIPT>
     

Actually, might this be general breakage in this functionality? I just got a
popup on the NYT site too
(http://www.nytimes.com/aponline/national/AP-American-Taliban.html). This
feature has been working great for a long time; I can't remember the last time I
saw a popup in mozilla, and today I installed 0.9.8 and I've seen two in the
last half hour...
Browser, not engine. Reassigning to Preferences and cc'ing Mitch.
Assignee: rogerl → sgehani
Component: JavaScript Engine → Preferences
QA Contact: pschwartau → sairuh
WFM, linux, cvs yesterday. I unchecked the box, removed the cookie, and when
I loaded the page, no window popped up.

-> WFM ??
I can confirm that somehow the prefs got changed in such a way that when the box
*is* checked, no windows will open. When the box _not_ checked, the windows will
open on www.nytimes.com and www.eonline.com. It would seem that sometime between
mozilla 0.9.7 and 0.9.8 the function of that checkbox simply got reversed
without the text of the prefs window changing. (This wasn't a problem before
0.9.8) I am using mozilla 0.9.8 on a Win2K machine.  
I don't believe that it's that simple. I've left the box unchecked, and the vast
majority of sites that would normally have a popup did not pop any windows. It
prevented them from happening. Yet, I still occasionally get them on NYTimes.com
and Eonline.com. 

For example, my test page http://www.seanh.net/dopop.html does give a popup with
the box checked, but doesn't with the box unchecked -- the preference has the
intended functionality on that page.

So it's not a basic toggle of the pref meaning; it's just not functioning right
in some rare cases.
Oh, and BTW, I've seen this in builds as recent as two days ago, so it's not
fixed yet.
And THIS page: http://www.seanh.net/popfunc.html

DOES create a popup even with the box unchecked. It uses the same method eonline
uses -- a function to do the popup, and calling it via an "onload" in an img tag.
Compare similar-sounding bug 126224,

  "NY Times web sites creates pop-up windows even if that feature is disabled"
All the img onload popups are now being duped to bug 126224, so duping this one too.

*** This bug has been marked as a duplicate of 126224 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
vrfy dupe
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.