The version(s) of jQuery affected
jQuery 1.10.2+ and jQuery UI 1.10.3+
The browser (or browsers) that you are able to reproduce the bug in, including version numbers
Any browser. Personally I tested it on Chromium Version 31.0.1650.63 Ubuntu 13.04
The operating system (or operating systems) you experienced the bug on.
AngularJS uses comment nodes to store information. The sortable component (probably other components aswell) uses jQuery .prev()/.next() to traverse the DOM. The problem is that these functions don't recognize comment nodes, so for instance when I use sortable.cancel(), the dragged element should be inserted back in the same spot it originally was; but this is not happening because the comment nodes are being ignored.
I have setup a basic demo here:
In its initial state, the sortable-related elements looks like this:
If you try to drag "Item A", after you drop it the code will automatically call sortable.cancel() for you. The elements will now look like this:
If you see, the "Item A" <li> tag should be after the first comment, but it is inserted back before it.
This might seem like a small issue, but it can make a difference between a broken sortable:
and a working one:
This last demo is using a modified version of the sortable code; instead of using .prev() I'm using .previousSibling.
I can submit a PR, but I wanted to add this here first to know if there is anything against this.