{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/1884","repository_url":"https://api.github.com/repos/riot/riot","labels_url":"https://api.github.com/repos/riot/riot/issues/1884/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/1884/comments","events_url":"https://api.github.com/repos/riot/riot/issues/1884/events","html_url":"https://github.com/riot/riot/issues/1884","id":165270314,"number":1884,"title":"Yielded element loses listeners","user":{"login":"adrianblynch","id":4160967,"avatar_url":"https://avatars.githubusercontent.com/u/4160967?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianblynch","html_url":"https://github.com/adrianblynch","followers_url":"https://api.github.com/users/adrianblynch/followers","following_url":"https://api.github.com/users/adrianblynch/following{/other_user}","gists_url":"https://api.github.com/users/adrianblynch/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianblynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianblynch/subscriptions","organizations_url":"https://api.github.com/users/adrianblynch/orgs","repos_url":"https://api.github.com/users/adrianblynch/repos","events_url":"https://api.github.com/users/adrianblynch/events{/privacy}","received_events_url":"https://api.github.com/users/adrianblynch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-13T08:56:30Z","updated_at":"2016-07-13T12:59:20Z","closed_at":null,"body":"## Issue\r\n\r\nElements loose their event listeners when yielded in a child tag.\r\n\r\nTooltip tag:\r\n```\r\n<tooltip>\r\n\t<yield />\r\n</tooltip>\r\n```\r\nPage tag:\r\n```\r\n<page>\r\n\t<button onclick={ this.onClick }>Regular button (works)</button>\r\n\t<tooltip>\r\n\t\t<button onclick={ this.onClick }>Tooltip button (does not work)</button>\r\n\t</tooltip>\r\n\t<script>\r\n\t\tthis.onClick = (e) => alert(e.target.innerText)\r\n\t</script>\r\n</page>\r\n```\r\n\r\nThe `onclick` on the second button, which is surfaced in `tooltip.tag`, is lost.\r\n\r\nIs this expected behaviour?\r\n\r\nThe view in Chrome's Dev Tools:\r\n\r\n<img width=\"500\" alt=\"click\" src=\"https://cloud.githubusercontent.com/assets/4160967/16797689/8df7b086-48e0-11e6-9e5d-f8cc49903a00.png\">\r\n\r\n<img width=\"500\" alt=\"no-click\" src=\"https://cloud.githubusercontent.com/assets/4160967/16797694/9095c80a-48e0-11e6-9eda-ffd58fbadd0b.png\">\r\n\r\n## Reproduce\r\n\r\nSee page.tag, tooltip.tag and index.html: http://plnkr.co/edit/hsjWZquiJEhIfTMj7sQ5?p=preview\r\n\r\nMaybe related to: https://github.com/riot/riot/issues/1139\r\n\r\n## Environment\r\n\r\nChrome 51\r\nMac OSX 10.10.5\r\nRiot 2.4.1 and latest riot+compiler.js in the plnk above.\r\n\r\n## Possible tags\r\n\r\n  - [x] Question\r\n  - [x] Bug\r\n  - [x] Discussion\r\n  - [x] Feature request\r\n  - [ ] Tip\r\n  - [ ] Enhancement\r\n  - [ ] Performance\r\n"},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/232346955","html_url":"https://github.com/riot/riot/issues/1884#issuecomment-232346955","issue_url":"https://api.github.com/repos/riot/riot/issues/1884","id":232346955,"user":{"login":"benaghaeipour","id":1853696,"avatar_url":"https://avatars.githubusercontent.com/u/1853696?v=3","gravatar_id":"","url":"https://api.github.com/users/benaghaeipour","html_url":"https://github.com/benaghaeipour","followers_url":"https://api.github.com/users/benaghaeipour/followers","following_url":"https://api.github.com/users/benaghaeipour/following{/other_user}","gists_url":"https://api.github.com/users/benaghaeipour/gists{/gist_id}","starred_url":"https://api.github.com/users/benaghaeipour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaghaeipour/subscriptions","organizations_url":"https://api.github.com/users/benaghaeipour/orgs","repos_url":"https://api.github.com/users/benaghaeipour/repos","events_url":"https://api.github.com/users/benaghaeipour/events{/privacy}","received_events_url":"https://api.github.com/users/benaghaeipour/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T12:59:20Z","updated_at":"2016-07-13T12:59:20Z","body":"Change \r\n```\r\n<tooltip>\r\n    <button onclick={ this.onClick }>Tooltip button (does not work)</button>\r\n</tooltip>\r\n```\r\nto\r\n```\r\n<tooltip>\r\n    <button onclick={ parent.onClick }>Tooltip button (does now work)</button>\r\n</tooltip>\r\n```\r\nshould work.\r\nhttp://plnkr.co/edit/hsjWZquiJEhIfTMj7sQ5?p=preview\r\n"}}
{"actor":{"display_login":"benaghaeipour"}}