diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-11-15 21:06:53 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-11-15 21:06:53 -0500 |
commit | 80797f5805c335a818bda4237642fc4935bd77f6 (patch) | |
tree | e03691d04c3316a12ae2a0bc03be75f431984424 /src/event.js | |
parent | ca8fc725ac8f590fff965e70c270c53ab0a6c0f3 (diff) | |
download | jquery-80797f5805c335a818bda4237642fc4935bd77f6.tar.gz jquery-80797f5805c335a818bda4237642fc4935bd77f6.zip |
Fix #10798. Don't re-bubble trigger()ed events in IE.
Since .trigger() already bubbles the event, we don't have to work around the non-bubbling IE events for that case.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event.js b/src/event.js index c9c891992..c6a711882 100644 --- a/src/event.js +++ b/src/event.js @@ -752,8 +752,8 @@ if ( !jQuery.support.submitBubbles ) { form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !form._submit_attached ) { jQuery.event.add( form, "submit._submit", function( event ) { - // Form was submitted, bubble the event up the tree - if ( this.parentNode ) { + // If form was submitted by the user, bubble the event up the tree + if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } }); @@ -793,7 +793,7 @@ if ( !jQuery.support.changeBubbles ) { } }); jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed ) { + if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; jQuery.event.simulate( "change", this, event, true ); } @@ -807,7 +807,7 @@ if ( !jQuery.support.changeBubbles ) { if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); |