mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 22:55:32 -05:00
Fix #10701, .preventDefault if an inline handler returns false.
Baby unicorns are slapped each time you use inline handlers, so do it sparingly.
This commit is contained in:
@@ -343,9 +343,10 @@ jQuery.event = {
|
||||
if ( handle ) {
|
||||
handle.apply( cur, data );
|
||||
}
|
||||
// Note that this is a bare JS function and not a jQuery handler
|
||||
handle = ontype && cur[ ontype ];
|
||||
if ( handle && jQuery.acceptData( cur ) ) {
|
||||
handle.apply( cur, data );
|
||||
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if ( event.isPropagationStopped() ) {
|
||||
|
||||
Reference in New Issue
Block a user