This project is archived and is in readonly mode.

#331 ✓resolved
Alcmene

Fx.Accordion.addSection breaks with Gecko and Core 1.3ß2

Reported by Alcmene | July 28th, 2010 @ 06:23 PM | in 1.3.0.1 rc1

Fx.Accordion.addSection breaks with FF 3.6.6 and Minefield ß3 if used with Core 1.3ß2 (and 1.3 nightly).

Everything fine with Safari.

Demos on JSfiddle

(you'll need to scroll down because I manually included Fx.Elements and Fx.Accordion since you can't ask for More with Core 1.3)

  1. with only dynamic sections: http://jsfiddle.net/cSZcT/1/
  2. with static sections at instanciation: http://jsfiddle.net/cSZcT/2/

Debug notes

I traced the problem with Firebug, and the (weird) problem seems to be on Array.contains:
line numbers given for an uncompressed MooTools More 1.2.4.4 file

More>2778: var test = this.togglers.contains(toggler);

"test" is [] instead of a Boolean

More>2779: this.togglers.include(toggler);
More>2780: this.elements.include(element);

"toggler" and "element" are not actually added to "this.togglers" and "this.elements". If you step into the function call, once again, the problem is that Array.contains pretends the value is in the array, so the push does not happen.

However, this is really strange since: - Array.contains returns the value of a boolean difference, so there's really no reason for it to return an array (even with it being empty) - why the hell would it break with an update that does not change anything to Array.contains nor its called helper Array.indexOf?

So, for now, I'd blame Firebug falsely displaying an empty array and the problem being somewhere else, but I can't think of any other helpful tool :-S

Any ideas/comments…?

Comments and changes to this ticket

Create your profile

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

The MooTools Extensions

People watching this ticket

Pages