Closed fpauser closed 12 years ago
Could you post a jsfiddle to illustrate it ?
Works: http://jsfiddle.net/PZkQm/ (ember-1.0-pre)
Does not work: http://jsfiddle.net/dc9Sb/ (ember-current)
PS: click the "X" to trigger the action
I think I've finally found what happened. Since this commit: https://github.com/emberjs/ember.js/commit/35fb8026e6f5abbeb936cd98f17e749f257beef1 the version of jQuery should be 1.8. I you update your fiddle, it works.
@wagenet, Peter, does that mean that ember is no more compatible with jQuery 1.7.2 ?
If you look carefully, you'll see that that commit still runs tests with 1.7.2 as well. 1.8 is just the default now. https://github.com/emberjs/ember.js/commit/35fb8026e6f5abbeb936cd98f17e749f257beef1#L0R140
@sly7-7 No, upgrading to jquery-1.8 does not work: http://jsfiddle.net/CgRxW/
I don't know what I've done, I apologize... I played this fiddle on multiple ember builds, and it seemed to work. I will try to continue to investigate...
Well, by doing a very smart search (:D), it seems this commit https://github.com/emberjs/ember.js/commit/ba3e74e02d160fa870181a851c9e897fc66e4b6c breaks some things.
see: http://jsfiddle.net/Sly7/Nusjm/, doesn't work and http://jsfiddle.net/Sly7/tkrVV/ (only one commit behind) works.
Going a little further, it seems that since this "problematic" commit, calling App.initialize() makes the job working. I was going to put a comment to this commit, but reading @tomhuda commit's comment:
- If you don't call initialize, you're gonna have a bad time.
I think it's explicit...
Looks like this is probably a documentation issue.
So, what is the actual issue? Does {{action}}
not work on un-initialized apps?
Yep, you can see it on the different fiddle here. But I think that more generally, un-initialized apps don't work at all. @wycats, @tomdale, am I right ?
Closing this issue - solution is to call "initialize()".
@sly7-7 That's correct; you must call initialize()
before the application sets itself up now. This is required because there are instances where applications become ready asynchronously. The case we were running into was that we needed to ready our IndexedDB before we started routing.
After updating emberjs in my rails-app from
v1.0.pre-7-g37780cf
to current ember-js the{{action}}
helper stopped working - maybe a context problem?