xuijs / xui

A tiny javascript framework for mobile web apps.
http://xuijs.com
788 stars 106 forks source link

Fix x$(window) behaviour on Safari 5.1. #60

Closed edufelipe closed 13 years ago

edufelipe commented 13 years ago

On release 2.3.0 there is a bug caused by the fact that window objects in Safari define a numeric length of 0.

Because of the testing order xui calls slice(window), which in turn returned an empty array and breaks the code.

This patch just inverts the testing order and everything works.

filmaj commented 13 years ago

Looks like this is also happening in Chrome 15. I'm going to merge your fix in but also try to add a test for this as well.

filmaj commented 13 years ago

I've merged this in @ 3c9fcad002a4666c7d2e0b51bb0af818a6816b9b. Also added a test for this @ 41e4dd0a863f9dd1770ac3514f1f43cd205994a1.

Thank you for your contribution!

P.S. added you to the contributor list @edufelipe :)

edufelipe commented 13 years ago

Thanks a lot @filmaj!