Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
expected behavior:
apple-click / ctrl-click / command-clicking a link on drupal.org should open the link in a background tab
this is my default browser behavior, and this is what happens on other websites
observed behavior:
command-clicking a link on drupal.org opens the link in a background tab
AND
opens the link in the active tab.
In other words, clicking a single link once opens the target in two tabs.
I'm not sure the best way to phrase this bug in a generic way, or if this is even the right queue.
Comments
Comment #1
AaronBaumansystem info:
observed on
OSX 10.6
Safari 5.0.3 (6533.19.4)
AND
Chrome 9.0.591.102
Comment #2
awolfey CreditAttribution: awolfey commentedAlso on Firefox/3.6.13 Win 7
Comment #3
laura s CreditAttribution: laura s commentedI noticed this, too, and it's incredibly aggravating. I love lots of open tabs. And I love it when my browsers behave as expected. It say this is a usability issue. #tag?
Comment #4
apadernoI just tested this on this page, and I cannot reproduce it.
The command-click opens the link in a new tab, and the new tab is placed in foreground; in any cases, the link is not open in the tab I am using to visualize the page containing the link.
Does this issue happen with specific links, or does it happen with the links to the user profiles too?
Comment #5
apadernoDoes it happen on browsers using GreaseKit (the equivalent of Greasemonkey for WebKit)?
Comment #6
apadernoI just verified this issue by clicking on the link I posted on #1080250-7: Unwanted subscription to Brazil Group.
I verified it happens also on Mac OS X Lion beta, which comes with Safari 5.1.
Comment #7
tacituseu CreditAttribution: tacituseu commentedSame problem Chrome 9.597.107 only external links affected, the culprit is ...
See #1057890: Prevent browsers default behavior if monitored links are clicked for a possible fix.
Comment #8
tacituseu CreditAttribution: tacituseu commentedAs a bonus it seems
breaks PHP syntax highlighting.
Comment #9
AaronBaumanShould this be in the Google Analytics queue then?
Also, fwiw, "api.drupal.org" is apparently considered an external link from drupal.org
Comment #10
apadernoI have marked #1084794: problem with javascript and links in issues as duplicate of this report.
Comment #11
joachim CreditAttribution: joachim commentedSubscribe.
Comment #12
sreynen CreditAttribution: sreynen commentedThe problem seems to be this specific line in the JS:
setTimeout('document.location = "' + this.href + '"', 100);
That's assuming every click intends to set the location on the current document, but a command-click has a different purpose. This line only affects external links, not every link, so that might explain why not everyone is seeing the problem.
The purpose of this delay is to give Google Analytics time to track outbound links. I don't think it's possible to reliably initiate new tabs via JavaScript, so I think losing outbound link tracking might be the only way to restore standard browser behavior. Is that an option or is that data too valuable to lose?
Short of a solution, there's a workaround: control-click the link and select "Open in new tab" from the contextual menu.
Comment #13
Damien Tournoud CreditAttribution: Damien Tournoud commented*sigh*
It's not the first time scripts from the Google Analytics module cause issues. Moving there.
Comment #14
hass CreditAttribution: hass commented#1057914: Custom outbound link tracking with outdated link targets or javascript is broken, install latest DEV please :-(
It is the very *first* time in 3 years that GA have a real issue and I'm very sorry for that.
Comment #15
sreynen CreditAttribution: sreynen commentedMoving back to webmasters queue so this can be resolved on drupal.org.
Comment #16
mr.baileysThis might be more of an infrastructure issue rather than a webmaster issue since it requires deploying code on drupal.org, not sure.
So I guess the options are:
Option 3 takes my preference.
Comment #17
apadernoI have marked #1097064: Middle click doesn't work as it should as duplicate of this report.
Comment #18
fuzzy76 CreditAttribution: fuzzy76 commentedSubscribing. What's holding back upgrading the module?
Comment #19
joachim CreditAttribution: joachim commented> [...] until a new version of GA is released
I don't see why the maintainer can't release a new version right now.
CVS branching used to hold us back for things like this when a module's branch would already have development changes and so you couldn't do a 1.1 hotfix for a major bug. This is no longer the case with git!
Comment #20
John Franklin CreditAttribution: John Franklin commentedI concur with joachim. A google_analytics 6.x-3.2.1 release with critical patches pulled in is entirely appropriate.
Comment #21
naxoc CreditAttribution: naxoc commentedSubscribe
Comment #22
kenorb CreditAttribution: kenorb commentedMarked as duplicate: #1105050: Links with Ctrl/CMD are self-redirected
Comment #23
gregglesI think we should do mr.baileys #4 - "Disable outbound link tracking on do."
Comment #24
gregglesNevermind my comment #23. Hass made the release: http://drupal.org/node/1108404
Comment #25
drummDeployed google_analytics 6.x-3.3.
Comment #27
joachim CreditAttribution: joachim commentedReopening -- this is happening on the DrupalCon London site.
Comment #28
sreynen CreditAttribution: sreynen commentedI think the London site probably needs a separate issue, so I made one: #1237044: london2011.drupal.org needs updating to resolve outbound link command-click problem