Fix inverted 'orig' and 'fix' event in mouseenter/mouseleave special events.
This commit is contained in:
parent
3afc6533e2
commit
2d27e053a0
10
src/event.js
10
src/event.js
|
@ -538,15 +538,15 @@ delegate = function( event ) {
|
||||||
|
|
||||||
// Create mouseenter and mouseleave events
|
// Create mouseenter and mouseleave events
|
||||||
jQuery.each({
|
jQuery.each({
|
||||||
mouseover: "mouseenter",
|
mouseenter: "mouseover",
|
||||||
mouseout: "mouseleave"
|
mouseleave: "mouseout"
|
||||||
}, function( orig, fix ) {
|
}, function( orig, fix ) {
|
||||||
jQuery.event.special[ fix ] = {
|
jQuery.event.special[ orig ] = {
|
||||||
setup: function(data){
|
setup: function(data){
|
||||||
jQuery.event.add( this, orig, data && data.selector ? delegate : withinElement, fix );
|
jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
|
||||||
},
|
},
|
||||||
teardown: function(data){
|
teardown: function(data){
|
||||||
jQuery.event.remove( this, orig, data && data.selector ? delegate : withinElement );
|
jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue