]> source.dussan.org Git - jquery.git/commitdiff
Make sure that mousing over Chrome "internal div" elements results in no trigger...
authorAnton M <obhvsbypqghgc@gmail.com>
Tue, 8 Feb 2011 15:57:06 +0000 (16:57 +0100)
committerAnton M <obhvsbypqghgc@gmail.com>
Tue, 8 Feb 2011 15:57:06 +0000 (16:57 +0100)
src/event.js

index f3a5d9f49a15ad4fc537d11bb85ed6fb6af12d83..a17cf8947beadcd359c775a85aed48cbfc05346e 100644 (file)
@@ -652,13 +652,15 @@ var withinElement = function( event ) {
 
        // Firefox sometimes assigns relatedTarget a XUL element
        // which we cannot access the parentNode property of
+       // Chrome does something similar, the parentNode property
+       // can be accessed but is null.
        try {
                // Traverse up the tree
                while ( parent && parent !== this ) {
                        parent = parent.parentNode;
                }
 
-               if ( parent !== this ) {
+               if ( parent && parent !== this ) {
                        // set the correct event type
                        event.type = event.data;