Don't run direct handlers if delegate did .stopPropagation().

This commit is contained in:
Dave Methvin
2011-10-21 10:56:16 -04:00
parent c4cc343c9c
commit 9fabe2028f
2 changed files with 17 additions and 1 deletions

View File

@@ -459,7 +459,7 @@ jQuery.event = {
delete event.delegateTarget;
// Run non-delegated handlers for this level
if ( handlers.length ) {
if ( handlers.length && !event.isPropagationStopped() ) {
dispatch( this, event, handlers, args );
}