This project is archived and is in readonly mode.

#457 ✓resolved

Sortables Detach/Attach duplicates lists

Reported by Peter | December 6th, 2010 @ 04:46 PM | in

In one of my projects i've found a strange behavior of the sortables class.

Simple Testcase: Create Sortables, call detach() and call attach() - now the initial list is duplicated.

I examined the source (current available release) and found something like this (pseudocode)

this.lists = removedLists (now this.lists contain the same like before)


which results in:

because attach() calls addLists(...) with "this.lists" as an argument (which is filled with the removed Lists from detach())

Same happens, when calling attach() multiple times. Because it has no effect at all to add a single list multiple times, a simple check if the list is already added will resolve this issue.

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