New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List.sortBy produces different order between Chromium/Chrome and Firefox #958

Open
wknapik opened this Issue May 13, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@wknapik

wknapik commented May 13, 2018

Edit: @evancz moved this gist directly into the issue.

2 6 3 4 5 1 7 10 9 11 8  -- Chromium/Chrome 66.0.3359.139 and 66.0.3359.170
2 6 1 3 4 5 7 9 10 11 8  -- Firefox 59.0.2 and 60.0

Tested on Linux.

import Html exposing (div, text)
import List
import Tuple

main =
   Html.beginnerProgram { model = [], view = view, update = (\_ -> \x -> x) }

view _ =
   div [] <| List.map (div [] << List.singleton << text << Tuple.first) (List.sortBy Tuple.second tuples)

tuples =
   [ ( "1", "foo" )
   , ( "2", "bar" )
   , ( "3", "foo" )
   , ( "4", "foo" )
   , ( "5", "foo" )
   , ( "6", "baz" )
   , ( "7", "foo" )
   , ( "8", "quux" )
   , ( "9", "foo" )
   , ( "10", "foo" )
   , ( "11", "foo" )
   ]

Thanks to @showell for helping out with this on slack.

@wknapik wknapik referenced this issue May 13, 2018

Closed

Stable sort #33

@wknapik

This comment was marked as resolved.

Show comment
Hide comment
@wknapik

wknapik May 14, 2018

Behavior unchanged as of Chromium 66.0.3359.170 and Firefox 60.0.

wknapik commented May 14, 2018

Behavior unchanged as of Chromium 66.0.3359.170 and Firefox 60.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment