For a workaround, all you need to do is use List.sortWith instead.

sortBy uses JavaScript's native array sorting function under the hood. The
JS function is documented as being unstable
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort>
(order not preserved when two elements are equal). Sounds like it might be
good to add a documentation note.

On Wed, Jul 13, 2016 at 8:10 AM, Mark Green <[email protected]> wrote:

> It appears that the functionality of List.sortBy is semi-browser dependent
> when the sorting function is a partial ordering.
>
> My current version of Firefox sorts according to the partial order, and
> within ties, maintains the order from the original list. However, user
> reports have been that some other browsers sort according to the partial
> order and apply arbitrary order within ties, which is obviously problematic.
>
> Is there a way around this and could a work-around be added to the library?
>
> Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to