Closed Bug 17468 Opened 25 years ago Closed 25 years ago

[WebShell] links w/target attribute do not create new window when clicked

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ckritzer, Assigned: mscott)

References

Details

(Keywords: regression, Whiteboard: [PDT+][NEED INFO])

Attachments

(2 files)

Overview Description: When a link which has a target attribute set is clicked, there is no new window generated for the url to load into. (It doesn't load into the current window either, but that's expected behaviour.) Steps to Reproduce: 1) Launch apprunner. 2) Download the attached file and load it into apprunner: 3) Click on the first link and it will not create a new browser window (the second link is simply for reference.) Actual Results: No new browser window is created. Expected Results: New browser window created and url loaded into it. Build Date & Platform Bug Found: Win98 19992808 apprunner Linux6 19992808 apprunner MacOS 19992810 apprunner Additional Builds and Platforms Tested On:
Assignee: rickg → joki
Tom -- this sounds like a job for our everquest champ.
Fixed, I tried to attach the diff to this bug several times but it never showd up in the bug so I'm including it here. Joki, does this look OK, will you check this in or should I? IMO this should go into M12. Thanks to tor@cs.brown.edu for making me aware of this and for helping fixing this... Index: webshell/src/nsWebShell.cpp =================================================================== RCS file: /cvsroot/mozilla/webshell/src/nsWebShell.cpp,v retrieving revision 1.293 diff -u -r1.293 nsWebShell.cpp --- nsWebShell.cpp 1999/11/06 03:37:32 1.293 +++ nsWebShell.cpp 1999/11/07 01:21:14 @@ -2942,7 +2942,7 @@ if (name.EqualsIgnoreCase("_blank")) { nsIWebShell *shell; - if (NS_OK == NewWebShell(PRUint32(~0), PR_TRUE, shell)) + if (NS_OK == NewWebShell(NS_CHROME_ALL_CHROME, PR_TRUE, shell)) target = shell; else { Index: xpfe/appshell/src/nsWebShellWindow.cpp =================================================================== RCS file: /cvsroot/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp,v retrieving revision 1.226 diff -u -r1.226 nsWebShellWindow.cpp --- nsWebShellWindow.cpp 1999/11/06 03:39:23 1.226 +++ nsWebShellWindow.cpp 1999/11/07 01:21:21 @@ -1612,8 +1612,13 @@ nsIAppShell *subshell; if (NS_SUCCEEDED(rv)) { nsCOMPtr<nsIBrowserWindow> browser(do_QueryInterface(newWindow)); - if (browser) + if (browser) { browser->SetChrome(aChromeMask); + + if (aVisible) { + browser->ShowAfterCreation(); + } + } // Spin into the modal loop. rv = nsComponentManager::CreateInstance(kAppShellCID, nsnull, kIAppShellIID, (void**)&subshell);
Whiteboard: Fixed
*** Bug 10388 has been marked as a duplicate of this bug. ***
*** Bug 7839 has been marked as a duplicate of this bug. ***
Blocks: 6085
Summary: links w/target attribute do not create new window when clicked → [WebShell] links w/target attribute do not create new window when clicked
*** Bug 19084 has been marked as a duplicate of this bug. ***
*** Bug 11934 has been marked as a duplicate of this bug. ***
*** Bug 19444 has been marked as a duplicate of this bug. ***
bug 8470 works like expected for me with the fix for this applied (ie it's a dup), bug 19510 might be something else, the links didn't work at all in a quick test I just did...
Just tested some more, 19510 is a dup, the links do work, my mistake. I'm marking both 19510 and 8470 as dups of this!
*** Bug 19510 has been marked as a duplicate of this bug. ***
*** Bug 8470 has been marked as a duplicate of this bug. ***
I tested all the attachments below and things seem to be working just fine. I noticed the status whiteboard shows Fixed, but not the plain status option it still says NEW.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I agree, should be marked fixed.
Status: RESOLVED → VERIFIED
Fixed in the Dec 22 build (1999122208).
Status: VERIFIED → REOPENED
This bug reappeared in the 1/15 nightly builds (reportedly) and in my cvs pull from 1/16 on solaris/native. The behavior is somewhat different than before: * ./mozilla-bin http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3052 * click on the first link ("target=_blank"). No window is created, and the following messages are printed: WEBSHELL+ = 4 nsXULKeyListenerImpl::Init() WARNING: unable to load datasource 'rdf:xpinstall-update-notifier', file /cs/src/mozilla/mozilla/rdf/content/src/nsXULDocument.cpp, line 5157 WEBSHELL+ = 5 title string = [Mozilla] * File->Exit. During shutdown another window pops up (the new browser window?), but is removed before drawing anything.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Fixed by waterson's checkin 1.32 of nsChromeProtocolHandler.cpp to fix 24144.
Fixed in the Jan 18th build.
Status: RESOLVED → VERIFIED
Reappeared in a 2/12 cvs pull on solaris/native. Steps to reproduce: * ./mozilla-bin http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3052 * click on the first link ("target=_blank"). No window is created, and the following messages are printed: WEBSHELL+ = 5 Skipping libstreamconv.so, already read assuming d&d is off for Navigator WARNING: unable to load datasource 'rdf:xpinstall-update-notifier', file /cs/src/mozilla/mozilla/rdf/content/src/nsXULDocument.cpp, line 5240 WEBSHELL+ = 6 WEBSHELL+ = 7 Setting content window browser.startup.page = 1 startpage = http://www.mozilla.org/ got a request Document http://bugzilla.mozilla.org/showattachment.cgi?attach_id=3052 loaded successfully Document: Done (1.743 secs) * File->Exit. During shutdown another window pops up (the new browser window?), but is removed before drawing anything.
Status: VERIFIED → REOPENED
Keywords: beta1, regression
Resolution: FIXED → ---
Whiteboard: Fixed
Is this cross platform? Does it happen on Linux?
Whiteboard: [NEED INFO]
Yes this happens on Linux.
Sorry forgot to mention that this is in the Feb 14th build (Linux).
Whiteboard: [NEED INFO] → [PDT+][NEED INFO]
This was broken even more yesterday, mscotts checkin to nsWebShell broke it even more, now the new webshell isn't found even if it's available (ie a frameset document) nor is any new webshells created. mscott is aware of this and he said that he's working on it.
*** Bug 27937 has been marked as a duplicate of this bug. ***
Travis and I broke this yesterday. I have a fix in my tree ready to go. If I click on the target=_blank example, I now see a new blank window come up (actually the default page is getting loaded into it right now) I'll try to get it reviewed and checked in tonight. re-assigning to me..
Assignee: joki → mscott
Status: REOPENED → NEW
I checked the fix in for this. In addition I fixed _new so we now properly create a new window. As far as I could tell all the target tests on that example web page worked for me. Although I did notice that _blank brings up a new window but it loads the default web page into the window which it probably shouldn't. But that can be in another non PDT+ bug.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Target Milestone: M14
Target names _blank, _self, _parent, _top, and _new all work for me in the Feb 18th build. The testcase provided in the first attachment uses a target name of "mozilla". This is not a reserve target name.
Target names _blank, _self, _parent, _top, and _new all work for me in the Feb 18th build. The testcase provided in the first attachment uses a target name of "mozilla". This is not a reserve target name.
links with targets that havea nonreserver targetname andneeda newwindow iscovered inPDt+bug #27419 Ihaveafixwaitingforreview forthatbug
Fixed in the Feb 21 build.
Status: RESOLVED → VERIFIED
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: