-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Ember breaks with 'Action is undefined' #1745
Comments
Perhaps it's the same, since #1571 is a PR which has not been merged. |
I tried the fix proposed in #1571 but it didn't solve the issue. I debugged the issue up to the point where I realized that Views sometimes have wrong children listed in their '_childViews' attribute. In my case when the "Add New Document" popup appears its forEachChildView method gets called. At this point in time its '_childViews' attribute contains wrong views and Ember unregisters all actions within these views (including the "Add New Document" button action). Therefore "Add New Document" button doesn't have an action associated with it any more. This is not a timing issue where the framework tries to deal with just removed views. The wrong children listed in '_childViews' are incorrectly set since the creation of the view. This view represents "Add New Document" popup i.e. the UploadDocumentView. The wrong views in '_childViews' belong to 'body' outlet however UploadDocumentView belongs to 'popup' outlet. It doesn't make sense the '_childViews' list of UploadDocumentView to have views which belong to outlet different than the outlet UploadDocumentView belongs to. |
My UI is constructed in the following way:
Then 'body' gets connected to the following template:
The embedded view has a button that opens a popup like this:
Full working sample is published here http://jsbin.com/egizit/2/
The steps to recreate the problem are:
PROBLEM: Ember breaks with 'action is undefined' error.
This issue is discussed here: http://stackoverflow.com/questions/14048030/emberjs-breaks-with-action-is-undefined
... and here: #1571
However this problem seems different than the closed issue in #1571
The text was updated successfully, but these errors were encountered: