If you add an onclick listener to an anchor with addEventListener, the return value is ignored and whatever is in the href is activated.
I come across this issue every day and have written about it before, but its only after coming out the other end of writing my addEventListener wrapper/replacement that I really appreciate just how mind bogglingly out of place this behavior is.
If this was a natural phenomena, creationists would simply have to throw their hands in the air and acknowledege that there was obviously nobody at the wheel.
Did you try event.preventDefault() ? That seems to be the proper way in the W3C DOM Level 2 Events model to cancel the default action associated with an event. It works great for me on Gecko.
if (foo) bar();