Forum: Open in new tab issues.

This is a minor issue, but it should also be an easy fix.

I’m a heavy user of the middle click on links to open them in new tabs (I’m using chrome, but this should be the same for any browser).
The issue is that when I’m middle clicking on a link (threads, subforums) in the forums, it not only loads the destination as a tab in the background (expected behaviour), but also loads the destination in the current tab (unexpected behaviour).

I suspect the cause to be in these lines from index.php:

  
<td class="windowbg topiclink" valign="middle" onclick="location.href='[http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/0](http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/0)  
    <span class="newpost" id="msg_15246"><a href="[http://forum.openframeworks.cc/index.php/topic,2811.0.html">gamuza,](http://forum.openframeworks.cc/index.php/topic,2811.0.html">gamuza,) easy developing video tracking installaton software</a></span>  
    <a href="[http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/1](http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/1) class="newicon" id="newicon15246"><img src="[http://forum.openframeworks.cc/Themes/ofw-theme/images/english/new.gif"](http://forum.openframeworks.cc/Themes/ofw-theme/images/english/new.gif") alt="New" /></a>  
    <small id="pages15246">&#171; <a href="[http://forum.openframeworks.cc/index.php/topic,2811.0.html">1</a>](http://forum.openframeworks.cc/index.php/topic,2811.0.html">1</a>) <a href="[http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/15](http://forum.openframeworks.cc/t/gamuza,-easy-developing-video-tracking-installaton-software/2811/15) &#187;</small>  
</td>  

I suspect that it’s caused by the onclick="" parameter in the first lines TD element. onclick has the nasty behaviour of triggering on both left and middle-click.
Removing this attribute completely from the TD element would of course have the side effect that you couldn’t click anywhere in that cell to open the tab. Maybe a compromise is to turn this into a regular href="" link, which is afaik only unsupported by the oldest browsers…

Ah yes I see.

I hadn’t even realised that you could click on a whole row to view a thread.

Personally I’d happily just make the thread title a link, rather than the whole row. But what does everyone else think?

i changed it on purpose cause the old forum worked like that and i kept clicking on the row : )

in firefox 5 it doesn’t seem to be a problem i can middle click the link and the first page stays where it is. surely there’s a way to detect left click?

I have never seen this problem before (heavy middle-click user on firefox), so could this be a chrome-only thing? OTOH, I would have never had the idea to _not_ click the thread title, but the cell it’s in, to open it… :o

I have the same problem in Safari on Mac. I routinely command-click on links to make them open in a new window (you can choose what should happen when command-clicking links in Safari’s prefs), but I’ve never been able to do that here on the OF forum.

So, here’s another vote for removing the onclick handler. :slight_smile: (And please don’t tie the fix to the click being with a mouse button other than the left button, since that wouldn’t help in my case.)

but command-click is nothing but emulation of middle-click for mouse-button-deficient hardware, isn’t it? so I don’t think that would impact you…

ok, i’ve removed the onclick handler by now till i find a solution that doesn’t break in some browsers

Great, thanks! Command-clicking now works fine for me at the top level of the forum. However, the onclick handlers seem to still be in place in the “sub forums” like introductions or advanced. So I would be even happier of the onclick handler went away there, too. :slight_smile:

Well, at least on Mac it isn’t. Control-clicking is used to emulate right-clicking (or is it the other way around? :wink: ) on Mac, but I don’t think there is any emulation at all of a third mouse button in the standard Mac OS X system libraries, at least not as far as I know.