related = event.relatedTarget,
handleObj = event.handleObj;
- // For mouseenter/leave call the handler if related is outside the target.
+ // For mousenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
event.type = handleObj.origType;
jQuery( "#qunit-fixture" ).append( "<div id='jc-outer'><div id='jc-inner'></div></div>" );
jQuery( "#jc-outer" ).on( "mouseenter mouseleave", function( event ) {
-
assert.equal( this.id, "jc-outer", this.id + " " + event.type );
-
- } ).trigger( "mouseenter" );
+ } );
jQuery( "#jc-inner" ).trigger( "mouseenter" );
-
- jQuery( "#jc-outer" ).off( "mouseenter mouseleave" ).remove();
- jQuery( "#jc-inner" ).remove();
-
} );
QUnit.test( "mouseenter, mouseleave don't catch exceptions", function( assert ) {