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

Breaks deferEvaluation computed bindings on IE10 with KO 3.1+ #28

Closed
cstigler opened this issue Mar 6, 2015 · 5 comments
Closed

Breaks deferEvaluation computed bindings on IE10 with KO 3.1+ #28

cstigler opened this issue Mar 6, 2015 · 5 comments

Comments

@cstigler
Copy link

cstigler commented Mar 6, 2015

Starting with Knockout v3.1, the deferred-updates plugin breaks bindings to deferEvaluation computeds on IE10. The bindings are receiving the computed function itself, instead of the value. I have no idea why.

JSFiddle demo (open in IE10): https://jsfiddle.net/cstigler/Lge05opy/1/

That demo uses the latest releases of both Knockout (3.3) and deferred-updates (the current version on master on GitHub). It's broken for me in the official IE10/Win7 virtual machine provided at modern.ie. Weirdly, while it's 100% broken in Knockout 3.3, if I compile Knockout 3.2 using closure-compiler 0.2.0, this bug will not occur. But if I compile KO 3.2 using closure-compiler 0.2.1, it's broken (the official production build is broken).

So my best guess is that the newer versions of closure-compiler are removing something from the KO internals that deferred-updates needs, in this specific case.

@mbest
Copy link
Owner

mbest commented Mar 6, 2015

Thanks for the report. I'll take a look at this soon.

@mbest
Copy link
Owner

mbest commented Mar 6, 2015

Fixed.

@mbest mbest closed this as completed Mar 6, 2015
@cstigler
Copy link
Author

cstigler commented Mar 7, 2015

@mbest Thank you! I don't totally understand how that fix works, but I'm glad you do!

@mbest
Copy link
Owner

mbest commented Mar 7, 2015

The problem stemmed from the fact that IE10 and below don't support setting the prototype using __proto__, which means that Knockout must copy properties instead. This makes the object signatures different from browsers that do support __proto__.

@cstigler
Copy link
Author

cstigler commented Mar 7, 2015

Cool, thanks for the explanation.

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