repetition rendering does not match expected content order #1159

mczepiel opened this Issue Mar 11, 2013 · 2 comments


None yet
2 participants

mczepiel commented Mar 11, 2013

I have a situation where a repetition with content [A,B,C,D,E] renders in the DOM with content ordered [A,E,D,C,B]

The content is provided by a RangeController. The controller has both its content and organizedContent in the expected order.

Prior to the content [A,B,C,D,E] being available, the repetition was showing content '[B,C,D,E]` in the correct order.

Switching back to the original [B,C,D,E] content appears to trigger an issue on repetition.js#L334 Cannot read property 'nodeType' of null though the rendered order is correct again when going back to the original content.

This is demonstrable in this admittedly interesting chaining of controllers

"targetChainController": {
                "prototype": "events/active-target-test/target-chain-controller",
                "bindings": {
                    "content": {"<-": "@nameField.eventManager.activeTarget"}

            "targetChainRangeController": {
                "prototype": "montage/core/range-controller",
                "bindings": {
                    "content": {"<-": "@targetChainController.organizedContent"}

            "targetRepetition": {
                "prototype": "montage/ui/repetition.reel",
                "properties": {
                    "element": {"#": "targetRepetition"}
                "bindings": {
                    "contentController": {"<-": "@test.targetChainRangeController"}

There's also a converter involved and two dynamic texts rendering different properties of the objectAtCurrentIteration


kriskowal commented Mar 11, 2013

Thanks, Mike. I’ve also seen odd behavior recently.

kriskowal was assigned Mar 11, 2013

@kriskowal kriskowal added a commit that referenced this issue Mar 14, 2013

@kriskowal kriskowal Fixion iteration retraction ion repetition
Retracts iterations from their original positions before inserting them
in new ones.  Was that repetition only retracted iterations that were
being removed completely.

Probably related to #1159, which needs verification.

mczepiel commented Mar 27, 2013

This looks fixed to me in my observation-based-testing. I don't have a proper spec to verify this with. I want to hit close, but I feel like there should be some regression test associated with this. Or is this adequately covered with existing tests?

kriskowal removed their assignment Feb 21, 2015

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