Closed Bug 232933 Opened 21 years ago Closed 21 years ago

javascript window.open('file or bookmark', '_self') does nothing..

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: martin.legris, Assigned: danm.moz)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

When using javascript window.open function, you can specify for it to open 
pages within the same window, therefore not create pop-ups. I use it 
throughout my web sites that I develop to forward to new pages.

I also use it to redirect to bookmarks inside web pages. Firebird seems to 
block that function completely, or atleast it does NOTHING. 

Reproducible: Always
Steps to Reproduce:
1. <script language='javascript'>window.open('mypage.html', '_self');</script>

Actual Results:  
nothing.

Expected Results:  
it should open a new page in the same window.
Confirming.
Assignee: blake → jag
Status: UNCONFIRMED → NEW
Component: General → XP Apps
Ever confirmed: true
Product: Firebird → Browser
QA Contact: pawyskoczka
Version: unspecified → Trunk
Attached file testcase
If you turn on pop-up blocking, window.open("whatever", "_self") that runs
automatically when a page is loaded is treated like a popup. If pop-up blocking
is off, it behaves normally. If the code is called from an onClick, it works
normally.

I'm thinking regression from bug 197919.
Keywords: regression, testcase
Flags: blocking1.7a?
This was reported against Firebird 0.7, so how can it be a regression from bug
197919?
Because it's present now (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7a) Gecko/20040205 Firebird/0.8.0+)
Oh wait, I get what you're saying now. Heh.
Can't blame 197919. This hasn't worked since I broke it in rev 1.605 last June.
C'mon folks! What sort of standard are you holding me to, eh? June, I say!
Assignee: jag → danm-moz
Status: NEW → ASSIGNED
Attachment #140810 - Flags: superreview?(bzbarsky)
Attachment #140810 - Flags: review?(caillon)
Comment on attachment 140810 [details] [diff] [review]
popup blocker once again tolerates window.open targeted to _self, _top et.al.

Doh!  sr=bzbarsky
Attachment #140810 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 140810 [details] [diff] [review]
popup blocker once again tolerates window.open targeted to _self, _top et.al.

r=caillon.

For reference, bug 177526 contains the original issue.

Aside: you might also wish to change the first portion of this function (not
shown in patch) to:

  PRBool allowWindow = !IsPopupBlocked(mDocument);

which would save you an assignment in the case where popup blocking is enabled
(if you make the relevant updates).
Attachment #140810 - Flags: review?(caillon) → review+
I didn't understand the last part of comment 8, how to make the initial
assignment to allowWindow more efficient. I suspect Christopher is looking at an
older version of the file. Or maybe I'm just dense today. And he took more than,
like, 15 seconds to get back to me with details. Perhaps an opportunity missed,
but no harm done. The patch is in as posted.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7alpha
Flags: blocking1.7a?
*** Bug 235818 has been marked as a duplicate of this bug. ***
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: