known bug on line 2392 and 2411 of 1.4?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

known bug on line 2392 and 2411 of 1.4?

philipp:s
There is a bug on line 2392 and 2411: var is missing:

        for ( var i = 0, l = match.length; i < l; i++ ) {
                for ( j in live ) {
                        fn = live[j];
                        elem = match[i].elem;
                        related = null;

                        if ( match[i].selector === fn.selector ) {
                                // Those two events require additional checking
                                if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
                                        related = jQuery( event.relatedTarget ).closest( fn.selector )
[0];
                                }

                                if ( !related || related !== elem ) {
                                        elems.push({ elem: elem, fn: fn });
                                }
                        }
                }
        }

        for ( var i = 0, l = elems.length; i < l; i++ ) {
                match = elems[i];
                event.currentTarget = match.elem;
                event.data = match.fn.data;
                if ( match.fn.apply( match.elem, args ) === false ) {
                        stop = false;
                        break;
                }
        }

And IE doesnot like that.

Regards,
Philipp

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.


Reply | Threaded
Open this post in threaded view
|

Re: known bug on line 2392 and 2411 of 1.4?

John Resig
Administrator
I just pushed a fix for this (adding 'l' to the var declaration). Good
catch! (I'd link to Github but it appears to be down.)

--John



On Mon, Jan 18, 2010 at 11:08 AM, philipp:s <[hidden email]> wrote:

> There is a bug on line 2392 and 2411: var is missing:
>
>        for ( var i = 0, l = match.length; i < l; i++ ) {
>                for ( j in live ) {
>                        fn = live[j];
>                        elem = match[i].elem;
>                        related = null;
>
>                        if ( match[i].selector === fn.selector ) {
>                                // Those two events require additional checking
>                                if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
>                                        related = jQuery( event.relatedTarget ).closest( fn.selector )
> [0];
>                                }
>
>                                if ( !related || related !== elem ) {
>                                        elems.push({ elem: elem, fn: fn });
>                                }
>                        }
>                }
>        }
>
>        for ( var i = 0, l = elems.length; i < l; i++ ) {
>                match = elems[i];
>                event.currentTarget = match.elem;
>                event.data = match.fn.data;
>                if ( match.fn.apply( match.elem, args ) === false ) {
>                        stop = false;
>                        break;
>                }
>        }
>
> And IE doesnot like that.
>
> Regards,
> Philipp
>
> --
> You received this message because you are subscribed to the Google Groups "jQuery Development" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to [hidden email].
> For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.
>
>
>
>

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.