(Ignoring pop-up ads (bug 29346) for this bug.) I hate window.open(). I know my browser. If I want a new window, I do a middle-click. If I happen to want a new window (middle-click), and the site also wants to give me one via window.open(), nothing happens (or worse, bug 64559 occurs). Just make window.open() work like an ordinary link. All of the command for links should be available, and work the same. I.e. if I do a normal click on it, just load the URL referenced in the window.open call in the current window. I should be able to open a context menu and "Open in new window", "Copy link location" (which will copy the link *only*, not the JS around it) etc.. I know, there is the problem in general that the onclick "script" can contain more than the single window.open call, and open will. In practice, usually only the window.open call interests me. (Anything else interesting would be overloading of the action.) Now, how to implement this? I don't know.
> and open will s/open/often/
Well, even if I tend to agree with you there's not really a whole lot that can be done about this, there's just too much history behind window.open() and if we change that half of the sites out there will break in ways people won't accept. IMO the only acceptable way window.open can be changed is to put different semantics behind a pref you can set if you want the "new" behavior but the normal window.open() call in a fresh mozilla or Netscape installation must remain as is. Patches are welcome as always but I doubt Netscape will put any resources into "fixing" this in the near future. And, window.open() is a *really* useful method, the problem is that people are abusing it like crazy.
> the normal window.open() call in a fresh mozilla or Netscape installation must > remain as is. Nothing else intended. This is an opt-in feature for users painfully annoyed by "misleaded" webdesigners.
*** Bug 141553 has been marked as a duplicate of this bug. ***
*** Bug 145418 has been marked as a duplicate of this bug. ***
"Allow web pages to make links open in new windows" has been removed (see bug 78037). Restoring original summary.
*** Bug 172595 has been marked as a duplicate of this bug. ***
As I suggested in 172595, I'd really like a way to *temoprarily* override window.open(). Then if you choose to override it, it becomes your problem. Most new windows I can stand, but there's times I'd rather it didn't at that particular time. A pref is a bit overkill from my point of view. Any thoughts?
*** Bug 173177 has been marked as a duplicate of this bug. ***
Clarification: by "block" above, I mean "turn into a normal link." Sorry for the possible confusion.
So... you want a pref that says 'disable window.open'? This might work, but I think it'd be better to have the opposite of a normal context menu's 'Open Link in New Window' so that window.open links are have an 'Open Link in Same Window'. Right?
Just like Netscape 3!!!
Oliver: you don't need special context menu items for overriding the pref temporarily. "Open Link in New Window" and "Open Link in New Tab" will work fine once bug 55696 is fixed.
I think that Open Link In Same Window is different from In New Tab. They're both useful, and should both exist. Netscape 3...
Mass-reassigning bugs to firstname.lastname@example.org
This might actually also be a way to solve the opposite problem - see bug 55696 comment 37.
> The pref should have the possibility to open new windows to new tabs instead. > Bug 184994, bug 105547 are exactly about this.