Closed Bug 273984 Opened 18 years ago Closed 17 years ago
.open(url, "_content") clobbers foreground tabs
STEPS TO REPRODUCE: 1) Make sure your tabs open in the background 2) Open attached testcase in a new tab EXPECTED RESULTS: The new tab says "I killed the old content" while the old tab has the bug page. ACTUAL RESULT: The new tab is blank, while the old tab says "I killed the old content" and the bug page is gone. This is akin to bug 265987. The problem is that _content and _main resolve to the "content-primary" docshell, but for tabbrowser that's the currently visible tab. Changes in bug 103638 may impose a cross-site security check here, which will just make the call fail instead of doing what it's supposed to do. The "right" fix would be to make _content and _main resolution do "the right thing" when called from inside a webpage. That means it should end up with the equivalent of _top. The question then is how to tell "when called from inside a webpage" apart from other cases... In general, perhaps nsIDocShellTreeOwner should have a list of content-primary shells, not just one? Or some other api to get all "main browser" shells?
The sidebar needs to be able to use _content to open links in the current tab...
Yes, I'm aware of that. That's what makes this "when called inside a webpage" thing hard... ;)
Fixed on trunk and 1.8 branch by checkin for bug 277971.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.