If you attach two or more event handlers to an HTML element, they would be executed one after the other. However, if you want to stop the subsequent event handlers, based on
The solution is browser specific. See dojo.stopEvent:
dojo.stopEvent = function(/*Event*/ evt){
// summary:
// prevents propagation and clobbers the default action of the
// passed event
// evt: Event
// The event object. If omitted, window.event is used on IE.
if(has("dom-addeventlistener") || (evt && evt.preventDefault)){
evt.preventDefault();
evt.stopPropagation();
}else{
evt = evt || window.event;
evt.cancelBubble = true;
on._preventDefault.call(evt);
}
};
Updated fiddle: http://jsfiddle.net/pFp7P/1/