Closed Bug 168807 Opened 23 years ago Closed 23 years ago

window.open(url,"_parent") doesn't work correctly

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: harunaga, Assigned: keeda)

References

()

Details

Attachments

(1 file)

window.open(url,"_parent") doesn't work correctly even if parent frameset exist. Steps: 1. Go to the URL above. 2. Click window.open("http://www.mozilla.gr.jp/","_parent"); in right bottom frame. Actual result: A new window opens. Expected result: The destination document should be opened in the parent frameset. http://developer.netscape.com/docs/manuals/communicator/jsref/win1.htm#1152528 windowName A string specifying the window name to use in the TARGET attribute of a FORM or A tag. windowName can contain only alphanumeric or underscore (_) characters. http://developer.netscape.com/docs/manuals/htmlguid/index.htm?content=tags7.htm#tags:A _parent opens the destination document in the parent window of the one displaying the current document. Note: If the frame has no parent, "_parent" may act as the value "_self". http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp Related to Bug 87968.
This seems to be a regression of Bug 70331.
forwarding this to DOM Level 0 component.
Component: HTMLFrames → DOM Level 0
QA Contact: amar → desale
Reassigning to default owner.
Assignee: jkeiser → jst
cc'ing danm@netscape.com who seems to know about this code (going by cvsblame)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch
Comment on attachment 104359 [details] [diff] [review] fix up stuff in nsWindowWatcher.cpp to make this work as expected What, has this never worked? I distinctly recall a time when _parent worked. I can verify that it's busted. I agree this patch is good and the right short-term fix. In the long run, we should ditch all the special-case code in nsWindowWatcher and call a version of nsDocShell::FindTarget that won't create a new window itself. See bug 103638.
Attachment #104359 - Flags: review+
Taking bug. (since danm seems to be happy with getting my patch in till such a time as the big cleanup happens.) danm, I'm new, help me out a bit more here ... What next? Who do I ask for sr for windowwatcher stuff ? (BTW, what bugzilla component is windowwatcher supposed to be anyways?)
Assignee: jst → keeda
This patch looks good to me; good to be reminded of the target cleanup though :)
Comment on attachment 104359 [details] [diff] [review] fix up stuff in nsWindowWatcher.cpp to make this work as expected sr=jst
Attachment #104359 - Flags: superreview+
Patch is in. Thanks Harshal!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.3alpha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: