This project is archived and is in readonly mode.

#195 ✓resolved
Christopher Cilley

Error seen with Tips

Reported by Christopher Cilley | November 26th, 2009 @ 06:14 AM | in

I get an error in both FF (3.0.15) and IE7 on even a simple page with Tips in MooTools v1.2.4.2 if there is an enclosing div in the page. This example is right out of the docs for Tips:

<script type="text/javascript" language="javascript" src="scripts/mootools.js"></script>
<script type="text/javascript" language="javascript">
window.addEvent('domready', function() {
var myTips = new Tips('.thisisatooltip');
<h2>Test my tool tips</h2>
<a href="" title="mootools homepage" class="thisisatooltip" />Show Tip</a>

In Firebug I get the error:
element.getParent is not a function on line 6782 of mootools.js

6780 fireForParent: function(event, element){
6781 if (!element) return;
6782 parentNode = element.getParent();
6783 if (parentNode == document.body) return;
6784 if (parentNode.retrieve('tip:enter')) parentNode.fireEvent('mouseenter', event);
6785 else this.fireForParent(parentNode, event);
6786 },

If I simply remove the enclosing div, no error is thrown.

Comments and changes to this ticket

  • Daniele C.

    Daniele C. December 9th, 2009 @ 09:43 AM

    The problem seems to be in the last line of the fireForParent method:

    the line is:

    else this.fireForParent(parentNode, event);

    but the definition of the function is:

    fireForParent: function(event, element){

    Then, simply change the last line in:

    else this.fireForParent(event, parentNode);

    Solve the error problem

  • fakedarren

    fakedarren January 11th, 2010 @ 08:05 PM

    • Milestone set to backlog
    • State changed from “new” to “open”
    • Assigned user set to “fakedarren”

    This has already been resolved and will be included in the next release (Hopefully towards the end of this week).

  • Aaron Newton

    Aaron Newton January 14th, 2010 @ 06:25 PM

    • State changed from “open” to “resolved”
    • Milestone changed from backlog to

    fixed for (soon)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions