Nice to hear, so my workaround is going to be obsolete - good to know
(me do hate workarounds :-))

On 11 Nov., 18:58, Aaron Newton <[email protected]> wrote:
> This is fixed in the codebase. We'll release it this week. Maybe today.
>
> On Wed, Nov 11, 2009 at 8:59 AM, Fli7e <[email protected]> wrote:
>
> > Hi Valerio, Christoph and the rest of the community reading this :-)
>
> > Today i started re-using the Moo-More Tips after a long time over at a
> > new project and my javascript console got spammed by "element.getParent
> > () is not a function" errors.
>
> > After recognicing me using the .1 version i fastly upgraded to moo-
> > more 1.2.4.2 but got the same error still (seeing this problem seems
> > to be not unknown as the .1 differs from .2).
>
> > To work around this and to be able to continue with my work i wrote
> > this small little Class, extending the Original MooTools Class and
> > adding a fix to the error throwing part.
>
> > Maybe this is of use for someone else than just me so here we go:
>
> > /*
> >  *      ---------------------------------------------------
> >  *      Extending Mootools Tips
> >  *      by Timo Henke / artness.de
> >  *      ---------------------------------------------------
> >  *
> >  *      Fixed the element.getParent() is not a function bug
> >  *      by not only checking for element but for the
> >  *      getParent() as a function
> >  *
> >  *      Works for Moo-More 1.2.4.1+2
> >  */
>
> >        var TipsFixed = new Class({
>
> >                Extends: Tips,
>
> >        /*
> >         *      ---------------------------------------------------
> >         *      Fixed the element.getParent() is not a function bug
> >         *      by not only checking for element but for the
> >         *      getParent() as a function
> >         *
> >         *      Works for Moo-More 1.2.4.1+2
> >         *      ---------------------------------------------------
> >         */
>
> >                fireForParent: function(event, element){
> >                        if( element && typeof element.getParent() ==
> > 'function' )
> >                        {
> >                                parentNode = element.getParent();
> >                                if (parentNode == document.body) return;
> >                                if (parentNode.retrieve('tip:enter'))
> > parentNode.fireEvent
> > ('mouseenter', event);
> >                                else this.fireForParent(parentNode, event);
> >                        }
> >                        else return;
> >                }
>
> >        });
>
> > Just use "new TipsFixed()" instead of "new Tips()" and you are done.
>
> > Regards,
>
> > Timo

Reply via email to