Bug 12240 - REGRESSION: Middle-clicking a link does not override target=_top
Summary: REGRESSION: Middle-clicking a link does not override target=_top
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://web.nickshanks.com/browsers/sa...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-01-13 02:31 PST by Paul Davidson
Modified: 2007-07-13 21:51 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Davidson 2007-01-13 02:31:16 PST
It is standard across web browsers that middle-clicking a link signifies the user's intent to open that link in a new tab. Safari, Camino, Firefox, and Opera all exhibit this behaviour. However, in the new Webkit nightly, if a link has the target attribute "_top", the link will be errantly opened in a new window even when middle-clicked.

This behaviour seems to be incorrect.

As an aside, it would be *really* nice to have a preference that forced all target=_top links to open in new tabs. A browser's window behaviour should remain in the user's control.
Comment 1 Darin Adler 2007-01-15 21:28:47 PST
Has someone reproduced this? With which nightly? The reason I asked is that I can't reproduce this problem with command-click. And the Safari application transforms middle clicks into command clicks.
Comment 2 Maciej Stachowiak 2007-01-29 03:52:35 PST
<rdar://problem/4960663>
Comment 3 Maciej Stachowiak 2007-02-07 02:44:28 PST
Apparetly this does really happen with middle-click, though not command-click.
Comment 4 Nicholas Shanks 2007-02-07 02:52:06 PST
I can't reproduce the buggy behaviour reported. In a test page I made with two frames, each containing a link. Left-clicking the link with it's target set to _top cleared the frameset and loaded the page in the same window. Middle-clicking the link opened it in a new tab.  With the target set to _new, left-clicking resulted in a new window, and middle-clicking resulted in a new tab. Test case added as URL above.

I have a Microsoft Intellimouse Explorer 3.0
If you want I can plug in a four button ADB mouse to my G3 and try there, but would need to update and recompile webkit on that machine, which may take 6 hours or so.
Comment 5 Andrew Wellington 2007-02-07 03:17:15 PST
On a machine with Logitech mouse drivers installed the following results were observed:
- MX1000 configured to send Command-click for scroll-wheel click opened a tab as expected
- Generic OEM Logitech mouse gave behaviour described - however the Logitech drivers seem to have taken over the generic mouse too giving this behaviour

On another machine with no custom mouse drivers the Generic OEM mouse opened a tab as expected.
Comment 6 Oliver Hunt 2007-07-13 21:51:14 PDT
I cannot reproduce this, if it is still reproducible i guess i'll have to go mouse hunting.

However given that it is not highly reproducible i am moving to p2 as well