Skip to content
Permalink
Browse files

Sadly, we still have to bubble the event so inline handlers will work.

  • Loading branch information...
dmethvin committed Apr 6, 2011
1 parent 246757b commit 29386db3196e883bffeda63f9e9db1f9ed336bba
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/event.js
@@ -71,8 +71,8 @@ jQuery.event = {

if ( !eventHandle ) {
elemData.handle = eventHandle = function( e ) {
// Handle the second event of a trigger and when
// an event is called after a page has unloaded
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
jQuery.event.handle.apply( eventHandle.elem, arguments ) :
undefined;
@@ -281,7 +281,6 @@ jQuery.event = {
// Event object or event type
var type = event.type || event,
ontype = "on" + type,
handling = jQuery.event.global,
namespaces = [],
cur = elem;

@@ -313,7 +312,7 @@ jQuery.event = {
event.stopPropagation();

// Save some time, only trigger if we've ever bound an event for this type
if ( handling[ type ] ) {
if ( jQuery.event.global[ type ] ) {
// XXX This code smells terrible. event.js should not be directly
// inspecting the data cache
jQuery.each( jQuery.cache, function() {
@@ -361,7 +360,7 @@ jQuery.event = {
} catch ( ieError1 ) {}

cur = cur.parentNode || cur.ownerDocument;
} while ( cur && !event.isPropagationStopped() && handling[ type ] );
} while ( cur && !event.isPropagationStopped() );

// If nobody prevented the default action, do it now
if ( !event.isDefaultPrevented() ) {

0 comments on commit 29386db

Please sign in to comment.
You can’t perform that action at this time.