Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEvents not applied for rendered view + delegateEvents() throws an error. #51
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wraithgar
Aug 22, 2014
Member
Two questions, first what version was this against? A patch was released yesterday that may have addressed this. Second, what do you mean by 'already rendered and an element is passed into a view instance?' I would like to try to duplicate this in a test so I can fix it.
|
Two questions, first what version was this against? A patch was released yesterday that may have addressed this. Second, what do you mean by 'already rendered and an element is passed into a view instance?' I would like to try to duplicate this in a test so I can fix it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ConneXNL
Aug 22, 2014
Contributor
By already rendered, i meant rendered server-side. Anyway I see a pull request was merged. https://github.com/AmpersandJS/ampersand-view/pulls
I will try tommorow if it fixes my issue, but it seems like it should.
|
By already rendered, i meant rendered server-side. Anyway I see a pull request was merged. https://github.com/AmpersandJS/ampersand-view/pulls |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This issue was indeed already fixed by #50 |
ConneXNL commentedAug 22, 2014
When a view is already rendered and an element is passed to a view instance, the events hash is NOT applied, is this intended?
Also, when you call this.delegateEvents(); manually an error is thrown because this.eventManager does not exist yet (as this is only created in _handleElementChange()).
As a work around I'm currently using this.trigger("change:el");