Skip to main content

Search and Top Navigation

#2926 closed bug (fixed)

Opened May 30, 2008 07:39PM UTC

Closed June 01, 2008 10:29PM UTC

Sortable Fails to sort to last position

Reported by: malfist Owned by: paul
Priority: major Milestone: 1.5
Component: ui.sortable Version:
Keywords: div, last position Cc:
Blocked by: Blocking:
Description

When using a DIV tag inside an unordered list with sorting inabled, if the list item being dragged/sorted has more div's than the last element, it can not be placed as the last element.

Example:

<ul id='sort'>
		<li><div>1</div><div><br /> 2</div></li>
		<li><div>2</div></li>
		<li><div>3</div></li>
		<li><div>4</div></li>
	</ul>
</div>
<script type='text/javascript'>
	$("#sort").sortable({ items: "li", revert: true});
</script>

While in the drag fuction(e) of jquery.ui.sortable the for loop that determines if an item has been moved reports a strange behavior with the index when compared to that of a normal list item.

I have the personalized jquery.ui with everything in it and this for loop is at line 2519 and the if statements that determine if an element has been moved is 10 lines below that.

Attachments (0)
Change History (2)

Changed May 30, 2008 07:40PM UTC by malfist comment:1

Sorry, that did not format properly:

<ul id='sort'>
		<li><div>1</div><div><br /> 2</div></li>
		<li><div>2</div></li>
		<li><div>3</div></li>
		<li><div>4</div></li>
	</ul>
</div>
<script type='text/javascript'>
	$("#sort").sortable({ items: "li", revert: true});
</script>

While in the drag fuction(e) of jquery.ui.sortable the for loop that determines if an item has been moved reports a strange behavior with the index when compared to that of a normal list item.

I have the personalized jquery.ui with everything in it and this for loop is at line 2519 and the if statements that determine if an element has been moved is 10 lines below that.

Changed June 01, 2008 10:29PM UTC by paul comment:2

resolution: → fixed
status: newclosed

This has been fixed in the newest version. The error causing it is the tolerance mode, which is now default at "guess".