mousedown
/mouseup
is indeed the only way you can get notified of middle button interaction, so detecting a down-then-up event without intervening mouseout
event is more or less the best you can do. It's not very good.
I wouldn't bother, since even if you trapped this one eventuality, there are many other interactions you can't pick up. As well as middle-click (which might not be ‘Open in new tab’ in all browser/configurations; for example in IE6 that'll be the user turning on scrolling mode), the user might right-click and ‘Open in new window’, or drag the link to the address bar or new tab, or various other browser-specific actions to perform a navigation.