{"action":"opened","issue":{"url":"https://api.github.com/repos/huei90/snap.svg.zpd/issues/36","labels_url":"https://api.github.com/repos/huei90/snap.svg.zpd/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/huei90/snap.svg.zpd/issues/36/comments","events_url":"https://api.github.com/repos/huei90/snap.svg.zpd/issues/36/events","html_url":"https://github.com/huei90/snap.svg.zpd/issues/36","id":64636147,"number":36,"title":"'destroy' doesn't work correctly in Internet Explorer (Solution provided)","user":{"login":"greglbd","id":3083175,"avatar_url":"https://avatars.githubusercontent.com/u/3083175?v=3","gravatar_id":"","url":"https://api.github.com/users/greglbd","html_url":"https://github.com/greglbd","followers_url":"https://api.github.com/users/greglbd/followers","following_url":"https://api.github.com/users/greglbd/following{/other_user}","gists_url":"https://api.github.com/users/greglbd/gists{/gist_id}","starred_url":"https://api.github.com/users/greglbd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greglbd/subscriptions","organizations_url":"https://api.github.com/users/greglbd/orgs","repos_url":"https://api.github.com/users/greglbd/repos","events_url":"https://api.github.com/users/greglbd/events{/privacy}","received_events_url":"https://api.github.com/users/greglbd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-26T21:16:47Z","updated_at":"2015-03-26T21:16:47Z","closed_at":null,"body":"When you use destroy in IE it doesn't remove the zpd.\r\n\r\nthis isn't a huge problem for more users but i discovered it as i need to destroy and immediately re load the zpd and it just takes the children from the original zpf and puts them inside a nested zpd which has the same ID.\r\n\r\n    <zpd>\r\n        <zpd>\r\n             ...child nodes\r\n        </zpd>\r\n    </zpd>\r\n\r\nthe reason this happens is because internet explorer doesn't understand parentElement in the _removeNodeKeepChildren function.  I discovered a fix, replace parentElement with parentNode which is below.\r\n\r\n    /**\r\n     * remove node parent but keep children\r\n     */\r\n    var _removeNodeKeepChildren = function removeNodeKeepChildren(node) {\r\n      if (!node.parentNode) {\r\n        return;\r\n      }\r\n      while (node.firstChild) {\r\n        node.parentNode.insertBefore(node.firstChild, node);\r\n      }\r\n      node.parentNode.removeChild(node);\r\n    };\r\n\r\ncheers\r\n\r\nGreg"}}