]> source.dussan.org Git - jquery.git/commitdiff
Event: fix incorrect test
authorOleg Gaidarenko <markelog@gmail.com>
Mon, 12 Oct 2015 15:37:04 +0000 (18:37 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Mon, 12 Oct 2015 15:38:41 +0000 (18:38 +0300)
Which was revealed by 03eaadb131df925d1072afd2496ee3b41d2f1fc6 commit,
also do not try to fix typos in data/jquery version

Cherry-picked from d92310050ca7bf0b33825d64e052f9a8809c3e9e

test/data/jquery-1.9.1.js
test/unit/event.js

index 81bdf19f323ddcdfbdb8796e2eed9790c9f222f1..80c97a226a9833674b06d341ca9f8e93389e9d33 100644 (file)
@@ -3525,7 +3525,7 @@ jQuery.each( {
                                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;
index 1750ed61b1be23fffef4ad0e5fe5a317878dc7f6..274cf41b5f6da3fe7a72380aea406ae1d2f223d8 100644 (file)
@@ -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( "#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 ) {