emberjs/ember.js — pull request #5016 by kevinkehl (2014-06-13 17:44:32+00:00)
Title: Sortable nonempty

SortableMixin should probably use computed.nonEmpty rather than computed.bool for the isSorted property. When sortProperties is set to an empty array, isSorted would evaluate to true, and arrangedContent would attempt to sort. orderBy returns 0, which in some browsers (Chrome with an array length > 22) leads to an unstable sort.

See this fiddle:

http://jsfiddle.net/46fT8/7/

In Chrome (I'm on 35.0.1916.153), there are swaps (Chrome uses quicksort for arrays > 22). Firefox (I'm at 30.0) leaves the names in their natural order.

I would expect that when sortProperties is empty, no sorting should be taking place.