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

Binding and xxxChanged function break if element is moved to a different shadow #203

Closed
JanMiksovsky opened this Issue Jul 10, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@JanMiksovsky

JanMiksovsky commented Jul 10, 2013

Moving an element from one shadow root to another appears to break the binding and the xxxChanged property function on the moved element.

See http://jsbin.com/ayiwem/2/edit for a trivial example that tries to isolate the issue. This shows a simple counter that increments a "count" property when clicked. When that property changes, the visible click count is updated, and a countChanged function is automatically invoked (which logs the change in the console). Clicking this button works as expected.

The second instance of the counter is hosted inside an element that creates a new (second) shadow root, and moves the counter into the new shadow subtree. As of last month, that code worked. That is, a click on the second button incremented the visible counter and invoked the countChanged function.

This code appears to have been broken by polymer-all check-in 72025651de9cf0892fd8b0afb7c91147bc9c1850. I'm wondering whether the new state of things is expected, or a bug.

@JanMiksovsky

This comment has been minimized.

Show comment
Hide comment
@JanMiksovsky

JanMiksovsky Jul 15, 2013

Updated example to track Polymer changes (<element> is now <polymer-element>, etc.): http://jsbin.com/ayiwem/4/edit

JanMiksovsky commented Jul 15, 2013

Updated example to track Polymer changes (<element> is now <polymer-element>, etc.): http://jsbin.com/ayiwem/4/edit

@sorvell

This comment has been minimized.

Show comment
Hide comment
@sorvell

sorvell Jul 23, 2013

Member

This should be fixed in the master branch by googlearchive/platform@160cf93

Member

sorvell commented Jul 23, 2013

This should be fixed in the master branch by googlearchive/platform@160cf93

@JanMiksovsky

This comment has been minimized.

Show comment
Hide comment
@JanMiksovsky

JanMiksovsky Jul 26, 2013

Sweet! Thank you.

JanMiksovsky commented Jul 26, 2013

Sweet! Thank you.

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