Skip to content
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

sortLayoutItemsByRowCol returning different results in Edge/IE 11-10 #369

Closed
guntherjh opened this issue Oct 13, 2016 · 5 comments
Closed

Comments

@guntherjh
Copy link

Hello,
First off, I'd like to say thanks for creating such a great library! It really has been quite fun to work with!

I noticed that I was getting inconsistent ordering of layout items across browsers, particularly in Edge/IE (11-10) vs Chrome/Firefox. After a couple of hours of debugging, I think I tracked down where the discrepancy is happening. It looks like the callback passed to sort() in sortLayoutItemsByRowCol() is returning different results based on browser. I recreated the problem here:

https://codepen.io/guntherjh/pen/qaKLNY

If you open the pen in Chrome vs Edge/IE 11-10, you'll see that the resulting array contains items in different order depending on browser.

Once again, thanks for all your hard work in creating a such a great library and please let me know if you need any further details from me.

@STRML
Copy link
Collaborator

STRML commented Oct 13, 2016

Very interesting! I believe the issue is the lack of an equality case.

This adjustment appears to produce consistent results:

https://codepen.io/anon/pen/bwKOJB

@STRML
Copy link
Collaborator

STRML commented Oct 13, 2016

I can confirm this fixes the issue in IE10. Do you have other VMs or machines handy so you could check in IE11/Edge?

@guntherjh
Copy link
Author

I am actually on a Windows machine. I confirmed your modification fixes the issue in Edge and IE 11. Thanks for the quick response!

@STRML
Copy link
Collaborator

STRML commented Oct 13, 2016

Great. I'll merge it in.

@guntherjh
Copy link
Author

Awesome! Thanks again for your help!

@STRML STRML closed this as completed in 7841e23 Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants