Uncaught Exception when opening a pop-up window with "Force Links..." set to open in the current window/tab

RESOLVED DUPLICATE of bug 264395

Status

()

Firefox
Tabbed Browser
--
critical
RESOLVED DUPLICATE of bug 264395
13 years ago
13 years ago

People

(Reporter: Jim Ginn, Assigned: Dan M)

Tracking

1.0 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
This could be a related to the several "Force links..." into tab bugs, but no
one has mentioned any problems when forcing links into the current window/tab.

Steps to reproduce:
1) Set "Force Links..." to open in the current window/tab.
2) Visit http://www.niho.com/forsale/detail2.asp?prop=241 and click on a map
picture.

The website is cleared and the JS console spits out:
"Error: uncaught exception: Permission denied to get property ChromeWindow.document"

I can see this problem on a couple of websites (cnn.com for example). 

Personally, I think it might be a good idea to load chromeless windows normally
(browser.link.open_newwindow.restriction = 3) when the user has selected to load
links that open new windows in the current tab/window. Additionally, I think
this would be the most intuitive to the end user - in most cases pop-up windows
should not steal the page (consider opening up an address book in a webmail
site, logging into a bank, or, worst case scenario, turning off the pop-up
blocker). This could also be a potential dataloss situation.
(Reporter)

Updated

13 years ago
Flags: blocking-aviary1.0?
(Assignee)

Comment 1

13 years ago
This is just an example of bug 264395, though this example is slightly different
from the one described in paragraph 2 of that bug's opening comment. This one goes

var w = window.open("")
w.document.write(...)

and would be expected to fail for the same reason. Note the particular error
mentioned in the opening comment is another issue, bug 266776.

It is as always impractical to deal with more than one topic in a single bug
report. Topic #2: open windows without chrome into a new window. Not very
different from restriction=2, and not especially salient to this bug. Topic #3:
ignore "same window" option for javascript:window.open windows (?) Perhaps. I've
written up bug 266927 for it.

*** This bug has been marked as a duplicate of 264395 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

13 years ago
Thanks DanM. I wasn't sure if they were the same bug, since the code was
slightly different. Also, I didn't mean for the bug to expand over multiple
problems. Whenever I post a bug I always try to post a potential solution and
not diverting chrome less windows was the best solution I could think of. You
are also correct about restriction=2, 3 was a typo and setting it to 2 does fix
a lot of these problems.
(Reporter)

Updated

13 years ago
Flags: blocking-aviary1.0?
You need to log in before you can comment on or make changes to this bug.