[Webkit-unassigned] [Bug 13618] HTMLAnchorElement should not force target to _blank for middle clicks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 15 00:36:04 PDT 2007


------- Comment #8 from zerodpx at gmail.com  2007-05-15 00:36 PDT -------
(In reply to comment #6)
> (From update of attachment 14500 [edit])
> I think setMiddleClickShouldForceTargetToBlank should be named differently.
> I think setMiddleClickShouldOpneNewWindow makes more sense to API users. An API
> user who isn't familiar with Web terms wont know what target blank is.

I don't think that's a good idea.  It's misleading in multiple ways.

First, it doesn't force the link to open in a new window.  It's perfectly
possible for links with target=_blank to _not_ open in new windows, based on
what you do in DecidePolicyForNewWindowSomething() (can't remember the exact
name, not looking at the source ATM).  And it's also possible to open a link in
a new window _without_ setting its target to blank, by proper implementation
inside DecidePolicyForNavigationAction().

Second, it implies that if you want middle clicks to open in new windows, you
should turn it on.  But that isn't true.  If you want middle clicks to open in
new windows, you _should_ do that in your policy delegates.  What _this_ flag
does is maintain a broken behavior for backwards-compat reasons.  So if I
weren't naming it middleClickShouldForceTargetToBlank, I'd name it

The name says exactly what it does.  If you don't know what it does, you
shouldn't be toggling it back and forth.  This is not a pref that most people
should be changing.  If that's not clear enough to embedders, I suggest that we
change the pref to a linktime version check, which was one option when this
patch got discussed in IRC.

Of course, backing off of that a bit, we could always just add voluminous
comments about the effects of this flag somewhere.  I just don't happen to know
where that place should be :)

(Incidentally, I'm not sure I buy your original assertion.  I haven't made a
web page since 1998, can't write JS, and didn't even know what "DOM" stood for
until a year ago, and I know what a blank target is.  Are people less
knowledgable than me likely to be embedding WebKit _and_ flipping its prefs?)

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list