[moving this issue here ...]
Suppose I have a document like this one:
<html>
<head>
<title></title>
<script src="/javascripts/jquery-1.4.2.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$('a.clickable').live('click', function(event) {
document.title = 'live click event triggered';
return false;
});
});
</script>
</head>
<body>
<a href='/foo' class='clickable'>link</a>
</body>
</html>
Then the event handler should be called (i.e. document.title set to 'live click event triggered') and the default action of the link (i.e. the request to /foo) should not happen.
What actually happens is: the request to /foo happens first and the event handler is called afterwards.
Jquery registers a live event handler to the topmost dom node, so the handler will be called after the event has bubbled up the entire tree. In envjs 0.3.4 event bubbling seems to happen at the very end of the __dispatchEvent__ method after default actions have been evaluated.
[moving this issue here ...]
Suppose I have a document like this one:
Then the event handler should be called (i.e. document.title set to 'live click event triggered') and the default action of the link (i.e. the request to /foo) should not happen.
What actually happens is: the request to /foo happens first and the event handler is called afterwards.
Jquery registers a live event handler to the topmost dom node, so the handler will be called after the event has bubbled up the entire tree. In envjs 0.3.4 event bubbling seems to happen at the very end of the
__dispatchEvent__method after default actions have been evaluated.