Skip to content

Commit

Permalink
If an inline handler returns false, call event.preventDefault() and e…
Browse files Browse the repository at this point in the history
…vent.stopPropagation().
  • Loading branch information
dmethvin committed Aug 26, 2010
1 parent 43b06cf commit 1a4162c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ jQuery.event = {
if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
event.result = false;
event.preventDefault();
event.stopPropagation();
}
}

Expand Down

0 comments on commit 1a4162c

Please sign in to comment.