mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #11796. Preserve oldIE change delegation on clone. Closes gh-789.
This commit is contained in:
@@ -835,13 +835,13 @@ if ( !jQuery.support.changeBubbles ) {
|
||||
jQuery.event.add( this, "beforeactivate._change", function( e ) {
|
||||
var elem = e.target;
|
||||
|
||||
if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
|
||||
if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
|
||||
jQuery.event.add( elem, "change._change", function( event ) {
|
||||
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
|
||||
jQuery.event.simulate( "change", this.parentNode, event, true );
|
||||
}
|
||||
});
|
||||
elem._change_attached = true;
|
||||
jQuery._data( elem, "_change_attached", true );
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -464,10 +464,6 @@ function cloneFixAttributes( src, dest ) {
|
||||
// Event data gets referenced instead of copied if the expando
|
||||
// gets copied too
|
||||
dest.removeAttribute( jQuery.expando );
|
||||
|
||||
// Clear flags for bubbling special change/submit events, they must
|
||||
// be reattached when the newly cloned events are first activated
|
||||
dest.removeAttribute( "_change_attached" );
|
||||
}
|
||||
|
||||
jQuery.buildFragment = function( args, context, scripts ) {
|
||||
|
||||
Reference in New Issue
Block a user