Hi there,
I've had this issue for a few weeks(months?) now but haven't bothered to report it yet. It is fairly annoying, even though it is minor, but I figured I'd report it anyways as the solution is simple.
The linode homepage uses a tracking script on outgoing links. This is supposed to open in a new tab if it is opened with the ctrlKey or some metaKeys (I'm not sure what the metaKeys refer to). This is the code:
Code:
$("a").on('click', function (e) {
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gaq.push(['_trackEvent', 'Outbound Links', e.currentTarget.host, url, 0]);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});The issue with this is, that with Win 7 and Chrome it doesn't seem to catch the middle mouse button in all cases. This is the case for links that go to a different domain (e.currentTarget.host != window.location.host). So if you are on the homepage (linode.com) and click on "Log In" (manage.linode.com) the handler is used to open the link. However the middle mouse button isn't caught, while normally (without javascript) it can be used to open links in new tabs.
The code below (which checks e.which === 2, which is the middle mouse button) will fix that. It would be awesome if it could be included.
Code:
$("a").on('click', function (e) {
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gaq.push(['_trackEvent', 'Outbound Links', e.currentTarget.host, url, 0]);
if (e.metaKey || e.ctrlKey || e.which === 2) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});Thanks!