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

es5-shim + angular 1.5 + currency filter crashes safari 8.x #398

Open
stringbeans opened this issue Apr 19, 2016 · 14 comments
Open

es5-shim + angular 1.5 + currency filter crashes safari 8.x #398

stringbeans opened this issue Apr 19, 2016 · 14 comments

Comments

@stringbeans
Copy link

When using the built-in currency filter in Angular 1.5.x , with es5-shim 4.5.8 and browsing with Safari 8.x the browser will crash...

http://plnkr.co/edit/zshIf4lDR0YgUXmHl8ou?p=preview

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

Hmm - I see the browser tab freezing. Does this happen without the es5-shim?

@MikaAK
Copy link

MikaAK commented Apr 19, 2016

removing es5-shim stops it from freezing @ljharb

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

@MikaAK does removing the currency filter usage also stop it from freezing?

@stringbeans
Copy link
Author

@ljharb removing the currency filter stops the freezing as well. This bug occurs if and only if both es5-shim and the currency filter are being used. I've also tried with other angular filters and it seems like it only occurs with the currency one

@stringbeans
Copy link
Author

Just to note, I've also tried downgrading to 4.2.x and the error still persists. Have not tried lower versions

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

Interesting, OK - this is going to be super hard to figure out because it doesn't error, it freezes.

A few things have happened with angular in the past that I'm pretty sure the currency filter is doing something super weird, and angular isn't interacting well with the es5-shim.

Knowing which version of angular started causing the problem would be very helpful, however.

@stringbeans
Copy link
Author

@ljharb I have a gut feeling this began occurring when we upgraded to angular 1.5.x. I'll do some tests with 1.4.x tomorrow to see if I can track down when it started happening..

@stringbeans
Copy link
Author

@ljharb ive found that it occurs in angular 1.4.9 but NOT 1.4.8... so 1.4.9 introduced the breaking change

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

@stringbeans Thanks, that's super helpful! Looking at angular/angular.js@v1.4.8...v1.4.9 isn't helping much, sadly :-/

@stringbeans
Copy link
Author

@ljharb i logged it in the angular repo too so hopefully a maintainer there will have an idea. i also looked at their changelog (https://github.com/angular/angular.js/blob/master/CHANGELOG.md) and for the 1.4.9 release there were changes made to formatNumber which may be the culprit!

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

angular/angular.js@9c49eb1 may thus be the commit in question

@ljharb
Copy link
Member

ljharb commented Apr 19, 2016

I see lots of potential in there for infinite loops.

@Narretz
Copy link

Narretz commented Apr 21, 2016

Is there actually anything in Safari 8 that needs to be shimmed?

@ljharb
Copy link
Member

ljharb commented Apr 21, 2016

@Narretz There is something in every single version of every single browser/engine that needs to be shimmed: there does not exist a JS engine that fully complies with ES5, even to this day.

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

No branches or pull requests

4 participants