I have noticed this issue before, but never filed a report, however since moving over to Django 1.4 (and possibly before) the page tree editor fails to detect the proper position when moving around items around within the same tree level.
E.g.:
- computers
- laptops
- desktops
- servers
In the scenario above only moves with the desktop node are picked up correctly. Because this node's position is detected as 'left' the proper function in the tree_editor.py is called.
However moving around either the laptop or server node to another position always results in calling the wrong function. This is caused by the javascript (line 178), which never picks up positions 'first-child'/'last-child' always returning 'left' instead.
Perhaps the domtree has changed within Django, nevertheless it seems there isn't support for detecting 'first-child' positioning in the javascript at all.