This project is archived and is in readonly mode.

#894 ✓resolved
gonchuki

possible issue with getPrevious/getNext in Slick / Moo 1.3

Reported by gonchuki | April 28th, 2010 @ 08:17 PM | in 1.3.0 rc2 (closed)

on older MooTools versions, getPrevious/getNext would match against all previous/next siblings and return the first match (if found), similar to what getElement does for children.
in 1.3 it's only matching against the direct siblings and not going anywhere farther than that. This is a breaking change, but as the online documentation on getPrevious/getNext is so vague, I can't really tell if this is a newly introduced bug or this was intended from the beginning when those 2 functions were created back in like the 1.1 days.
I know there's a getAllPrevious/getAllNext, but those functions return a collection of all the prev/next siblings and not the first match found (they are to getPrevious/getNext as getElements is to getElement)

here's a shell illustrating the issue: http://mootools.net/shell/GyVT4/
try changing moo version to 1.2.4 and you will see it matches correctly.

To make it clear, there's been a change in 1.3 that potentially breaks a truckload of code out there, I just need clarification if this was intended or it's an unforeseen bug.

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 »

Shared Ticket Bins

Referenced by

Pages