mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Event: fix incorrect test
Which was revealed by03eaadb131
commit, also do not try to fix typos in data/jquery version Cherry-picked fromd92310050c
This commit is contained in:
parent
4e3f971866
commit
e73a67f2e2
2
test/data/jquery-1.9.1.js
vendored
2
test/data/jquery-1.9.1.js
vendored
@ -3525,7 +3525,7 @@ jQuery.each( {
|
|||||||
related = event.relatedTarget,
|
related = event.relatedTarget,
|
||||||
handleObj = event.handleObj;
|
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
|
// NB: No relatedTarget if the mouse left/entered the browser window
|
||||||
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
||||||
event.type = handleObj.origType;
|
event.type = handleObj.origType;
|
||||||
|
@ -877,16 +877,10 @@ QUnit.test( "withinElement implemented with jQuery.contains()", function( assert
|
|||||||
jQuery( "#qunit-fixture" ).append( "<div id='jc-outer'><div id='jc-inner'></div></div>" );
|
jQuery( "#qunit-fixture" ).append( "<div id='jc-outer'><div id='jc-inner'></div></div>" );
|
||||||
|
|
||||||
jQuery( "#jc-outer" ).on( "mouseenter mouseleave", function( event ) {
|
jQuery( "#jc-outer" ).on( "mouseenter mouseleave", function( event ) {
|
||||||
|
|
||||||
assert.equal( this.id, "jc-outer", this.id + " " + event.type );
|
assert.equal( this.id, "jc-outer", this.id + " " + event.type );
|
||||||
|
} );
|
||||||
} ).trigger( "mouseenter" );
|
|
||||||
|
|
||||||
jQuery( "#jc-inner" ).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 ) {
|
QUnit.test( "mouseenter, mouseleave don't catch exceptions", function( assert ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user