-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-insert rows when re-attaching. Fixes #1498.
- Loading branch information
1 parent
5250037
commit da2c5f7
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
da2c5f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my use case the fix doesn't work - the re-inserted nodes don't show up.
If i omit the Polymer.dom(...) calls in the "attached" callback, the insertion is performed and the nodes show up, but local styling disappears.
Here is a stripped down demo:
< script src="polymer1.0/bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
< link rel="import" href="polymer1.0/bower_components/polymer/polymer.html">
< link rel="import" href="polymer1.0/bower_components/paper-material/paper-material.html">
< /head>
< body>
< div id="first">< outer-element id="my-list">< /outer-element>< /div>
< div id="second">< /div>
< button onclick="changeParent()">move my-list to second div< /button>
< script>
function changeParent() {
Polymer.dom(document.querySelector("#second")).appendChild(document.querySelector("#my-list"))
}
< /script>
< /body>
< /html>