{"action":"closed","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-iconset-svg/issues/55","repository_url":"https://api.github.com/repos/PolymerElements/iron-iconset-svg","labels_url":"https://api.github.com/repos/PolymerElements/iron-iconset-svg/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-iconset-svg/issues/55/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-iconset-svg/issues/55/events","html_url":"https://github.com/PolymerElements/iron-iconset-svg/issues/55","id":179947312,"number":55,"title":"not removing icon","user":{"login":"e111077","id":5981958,"avatar_url":"https://avatars.githubusercontent.com/u/5981958?v=3","gravatar_id":"","url":"https://api.github.com/users/e111077","html_url":"https://github.com/e111077","followers_url":"https://api.github.com/users/e111077/followers","following_url":"https://api.github.com/users/e111077/following{/other_user}","gists_url":"https://api.github.com/users/e111077/gists{/gist_id}","starred_url":"https://api.github.com/users/e111077/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e111077/subscriptions","organizations_url":"https://api.github.com/users/e111077/orgs","repos_url":"https://api.github.com/users/e111077/repos","events_url":"https://api.github.com/users/e111077/events{/privacy}","received_events_url":"https://api.github.com/users/e111077/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"bicknellr","id":406614,"avatar_url":"https://avatars.githubusercontent.com/u/406614?v=3","gravatar_id":"","url":"https://api.github.com/users/bicknellr","html_url":"https://github.com/bicknellr","followers_url":"https://api.github.com/users/bicknellr/followers","following_url":"https://api.github.com/users/bicknellr/following{/other_user}","gists_url":"https://api.github.com/users/bicknellr/gists{/gist_id}","starred_url":"https://api.github.com/users/bicknellr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bicknellr/subscriptions","organizations_url":"https://api.github.com/users/bicknellr/orgs","repos_url":"https://api.github.com/users/bicknellr/repos","events_url":"https://api.github.com/users/bicknellr/events{/privacy}","received_events_url":"https://api.github.com/users/bicknellr/received_events","type":"User","site_admin":false},"assignees":[{"login":"bicknellr","id":406614,"avatar_url":"https://avatars.githubusercontent.com/u/406614?v=3","gravatar_id":"","url":"https://api.github.com/users/bicknellr","html_url":"https://github.com/bicknellr","followers_url":"https://api.github.com/users/bicknellr/followers","following_url":"https://api.github.com/users/bicknellr/following{/other_user}","gists_url":"https://api.github.com/users/bicknellr/gists{/gist_id}","starred_url":"https://api.github.com/users/bicknellr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bicknellr/subscriptions","organizations_url":"https://api.github.com/users/bicknellr/orgs","repos_url":"https://api.github.com/users/bicknellr/repos","events_url":"https://api.github.com/users/bicknellr/events{/privacy}","received_events_url":"https://api.github.com/users/bicknellr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-29T03:58:36Z","updated_at":"2016-09-30T22:26:56Z","closed_at":"2016-09-30T22:26:56Z","body":"@bicknellr This has to do with the 2.0 preview branch\r\n\r\nIn `iron-iconset-svg`, `applyIcon` tries to get the shadow root using `element.root`.\r\n\r\nThe first time this is run (I believe that this may be on attached) `element.root` seems to return a document fragment instead of the shadow root. It also seems as if the contents of that element (the element typically being an `iron-icon`) have not been stamped yet.\r\n\r\nEvery time after first render, it seems as if `element.root` is a proper shadow root. This causes issues because we set `element.root._svgIcon = svg` in `applyIcon`'s return statement. This means that when `removeIcon` is run, it cannot remove the first icon which results in an icon in both the document fragment and the shadow root when you change the icon in `iron-icon` (because changing the icon runs `applyIcon` again).\r\n\r\nHere is a screenshot of what happens.\r\n![image](https://cloud.githubusercontent.com/assets/5981958/18940572/281c8230-85be-11e6-9b65-d40f8dc186e3.png)\r\nThe icon on the right was applied to the document fragment and the icon on the left was applied to the shadow root. The only one that toggles / changes when `iron-icon.icon` changes is the one on the left because we can now only access the shadow root."}}
{"actor":{"display_login":"e111077"}}