Suppose we have the ff. in a.html:
<script>
function onClick() {
// Do some important stuff and then...
location = "b.html";
}
</script>
<a href="#" onclick="onClick();">Link</a>
Double-clicking on Link will trigger the event-handler onClick. However, the second click in the double-click seems to be interpreted as another click and causes the page to jump to the named anchor. In effect, the location isn't changed.
My questions are:
Is this a browser bug or feature?
Is there a way to work-around this behavior?