Cmd-left-click on links is not opening in new tab

Like so many modern web pages, swift.org seems to block/intercept/disable the cmd-left-click action on a link. This is supposed to open a link in a new tab but right now it simply opens the link in the current tab. This is incredibly annoying and requires using the right click menu to select "Open link in new tab".

I can't think of any useful reason for blocking this standard key/mouse combo. It's a real impediment to using the website, in my opinion.

2 Likes

Could you give an example of a specific link on a specific page which exhibits the behavior you describe?

Definitely.

If you go to this page Swift.org - Blog

and cmd-click on the "Read More..." link in the "Accessibility..." section you will see that it opens the link in the current tab rather than a new tab.

Interestingly the issue is intermittent. I brought up the on screen keyboard to verify that my command keypress is being recorded (ie. not a bad key). With a little bit of fiddling it seems the first time I cmd-click it opens in the current tab.. if I then go back and cmd-click again I get a new tab.

1 Like

I can't reproduce this. And although I haven't decompiled the small script, near as I can tell the link is a garden variety <a href>.

My initial tests were in Safari.. Chrome produces a different result:

sometimes I get a new tab but it comes to the foreground and other times I get a background tab (the latter being the expected result).

Edited to add: if I disable javascript in safari everything works fine.

I just want to chime in to say cmd-click doesn't work for me either. This is true of every link on swift.org, including links to external websites.

Disabling JavaScript fixes it.

Curiously, if I cmd-click a link, then go back to the page with the link I just clicked and cmd-reclick the same link, this time it will open in a separate tab.

Safari 14.0.3 (16610.4.3.1.4) on Big Sur 11.2.1 (20D74)

Looks like this was reported in SR-13288.

Ah. ok cool. Good to know. I don't have an account on there but consider this my vote for the issue :smiley:

Thanks!
Berj

It looks like analytics.js is adding a click handler to all links and that's messing up navigation.

I wouldn't hold your breath.