File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -661,7 +661,7 @@ var withinElement = function( event ) {
661661
662662 // Chrome does something similar, the parentNode property
663663 // can be accessed but is null.
664- if ( parent !== document && ! parent . parentNode ) {
664+ if ( parent && parent !== document && ! parent . parentNode ) {
665665 return ;
666666 }
667667 // Traverse up the tree
Original file line number Diff line number Diff line change @@ -683,6 +683,20 @@ test("hover()", function() {
683683 equals ( times , 4 , "hover handlers fired" ) ;
684684} ) ;
685685
686+ test ( "mouseover triggers mouseenter" , function ( ) {
687+ expect ( 1 ) ;
688+
689+ var count = 0 ,
690+ elem = jQuery ( "<a />" ) ;
691+ elem . mouseenter ( function ( ) {
692+ count ++ ;
693+ } ) ;
694+ elem . trigger ( 'mouseover' ) ;
695+ equals ( count , 1 , "make sure mouseover triggers a mouseenter" ) ;
696+
697+ elem . remove ( ) ;
698+ } ) ;
699+
686700test ( "trigger() shortcuts" , function ( ) {
687701 expect ( 6 ) ;
688702
You can’t perform that action at this time.
0 commit comments