{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/3828","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/3828/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/3828/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/3828/events","html_url":"https://github.com/meteor/meteor/issues/3828","id":59275517,"number":3828,"title":"Blaze.remove on Views rendered based on a data context provided by template helper does not work","user":{"login":"lucendio","id":6096589,"avatar_url":"https://avatars.githubusercontent.com/u/6096589?v=3","gravatar_id":"","url":"https://api.github.com/users/lucendio","html_url":"https://github.com/lucendio","followers_url":"https://api.github.com/users/lucendio/followers","following_url":"https://api.github.com/users/lucendio/following{/other_user}","gists_url":"https://api.github.com/users/lucendio/gists{/gist_id}","starred_url":"https://api.github.com/users/lucendio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucendio/subscriptions","organizations_url":"https://api.github.com/users/lucendio/orgs","repos_url":"https://api.github.com/users/lucendio/repos","events_url":"https://api.github.com/users/lucendio/events{/privacy}","received_events_url":"https://api.github.com/users/lucendio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/confirmed","name":"confirmed","color":"e10c02"},{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Blaze","name":"Project:Blaze","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-27T18:32:46Z","updated_at":"2016-04-02T01:51:36Z","closed_at":null,"body":"I am not sure, if I'm holding it wrong or if its really a bug. I just ran into the problem introduced above.\r\n\r\nI simply want to remove an list element by clicking on it. The event handler then just perform a Blaze.remove( template.view ). And that works, well, sort of. Only the once disabear which I put into the DOM by Blaze.renderWithData. The elemets rendered based on a data context provided by a template helper, just don't. Eaven if I make data source reative.\r\n\r\nI provided an example: https://github.com/lucendio/blaze-remove-bug\r\nThe first 3 (client/templates/clog_onsceen.js:21) messages appearing on the top of the window wouldn't disapear by clicking on them, but the last does (client/templates/clog_onsceen.js:46)\r\ndisclaimer: I tried to run my example with a late version of devil (27th of Feb.), becasue I saw a potentialy related fix listed in the History.md for the next release. But without any success - I did as described in the readme and sadly run into \"error: Symlink cycle detected at meteor/dev_bundle/lib/node_modules\".\r\n\r\nAs I said, I am not sure, if it is really a bug or if I am doing anything wrong. If thats the case, I am sorry for bothering and would like to get an enlightenment from you guys :)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/204625653","html_url":"https://github.com/meteor/meteor/issues/3828#issuecomment-204625653","issue_url":"https://api.github.com/repos/meteor/meteor/issues/3828","id":204625653,"user":{"login":"flatr0ze","id":1392048,"avatar_url":"https://avatars.githubusercontent.com/u/1392048?v=3","gravatar_id":"","url":"https://api.github.com/users/flatr0ze","html_url":"https://github.com/flatr0ze","followers_url":"https://api.github.com/users/flatr0ze/followers","following_url":"https://api.github.com/users/flatr0ze/following{/other_user}","gists_url":"https://api.github.com/users/flatr0ze/gists{/gist_id}","starred_url":"https://api.github.com/users/flatr0ze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flatr0ze/subscriptions","organizations_url":"https://api.github.com/users/flatr0ze/orgs","repos_url":"https://api.github.com/users/flatr0ze/repos","events_url":"https://api.github.com/users/flatr0ze/events{/privacy}","received_events_url":"https://api.github.com/users/flatr0ze/received_events","type":"User","site_admin":false},"created_at":"2016-04-02T01:51:36Z","updated_at":"2016-04-02T01:51:36Z","body":"upd: the problem seems to be happening with Blaze.render as well. This problem occurs each time I re-create the same parent (container) DOM element and render a template inside it, either with Blaze.render or Blaze.renderWithData. Calling Blaze.remove() upon destroying the template helps, but only while the container DOM is still the same.\r\n\r\nIn my applications I render various templates inside that DOM, (within Meteor.autorun). I have Blaze.remove() on the first line of my .autorun's callback function and also prior removing that DOM element in my jQuery plugin."}}