{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/comments/53364801","id":53364801,"diff_hunk":"@@ -343,7 +342,9 @@\n     },\n \n     _registerElement: function(e) {\n-      var element = e.target;\n+      // Get the actual element that fired the event\n+      var element = Polymer.dom(e).path[0];","path":"iron-form.html","position":39,"original_position":39,"commit_id":"bfe79f6278691df306a1c4895d54e8e65f633240","original_commit_id":"bfe79f6278691df306a1c4895d54e8e65f633240","user":{"login":"valdrinkoshi","id":6173664,"avatar_url":"https://avatars.githubusercontent.com/u/6173664?v=3","gravatar_id":"","url":"https://api.github.com/users/valdrinkoshi","html_url":"https://github.com/valdrinkoshi","followers_url":"https://api.github.com/users/valdrinkoshi/followers","following_url":"https://api.github.com/users/valdrinkoshi/following{/other_user}","gists_url":"https://api.github.com/users/valdrinkoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/valdrinkoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valdrinkoshi/subscriptions","organizations_url":"https://api.github.com/users/valdrinkoshi/orgs","repos_url":"https://api.github.com/users/valdrinkoshi/repos","events_url":"https://api.github.com/users/valdrinkoshi/events{/privacy}","received_events_url":"https://api.github.com/users/valdrinkoshi/received_events","type":"User","site_admin":false},"body":"`Polymer.dom(e).rootTarget` should be a bit better in terms of performance (since you need only one element and not the whole path tree)","created_at":"2016-02-18T19:06:45Z","updated_at":"2016-02-18T19:06:45Z","html_url":"https://github.com/PolymerElements/iron-form/pull/110#discussion_r53364801","pull_request_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/comments/53364801"},"html":{"href":"https://github.com/PolymerElements/iron-form/pull/110#discussion_r53364801"},"pull_request":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110","id":59741552,"html_url":"https://github.com/PolymerElements/iron-form/pull/110","diff_url":"https://github.com/PolymerElements/iron-form/pull/110.diff","patch_url":"https://github.com/PolymerElements/iron-form/pull/110.patch","issue_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/110","number":110,"state":"open","locked":false,"title":"Fix double submission of elements","user":{"login":"notwaldorf","id":1369170,"avatar_url":"https://avatars.githubusercontent.com/u/1369170?v=3","gravatar_id":"","url":"https://api.github.com/users/notwaldorf","html_url":"https://github.com/notwaldorf","followers_url":"https://api.github.com/users/notwaldorf/followers","following_url":"https://api.github.com/users/notwaldorf/following{/other_user}","gists_url":"https://api.github.com/users/notwaldorf/gists{/gist_id}","starred_url":"https://api.github.com/users/notwaldorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notwaldorf/subscriptions","organizations_url":"https://api.github.com/users/notwaldorf/orgs","repos_url":"https://api.github.com/users/notwaldorf/repos","events_url":"https://api.github.com/users/notwaldorf/events{/privacy}","received_events_url":"https://api.github.com/users/notwaldorf/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/PolymerElements/iron-autogrow-textarea/issues/33\r\n\r\nThis is part of a 3-headed hydra of PRs that is trying to fix the following problem: `iron-form` was bad at de-duping nested elements with the same `name`, and would double submit them. The problem was that if you bind the `name` attribute all the way down, and these children you're binding it to are either native elements (so the form automatically cares about them) or custom elements with the `IronFormElementBehavior`, you would submit the same value twice.\r\n\r\nThis PR cleans up the double submission code with the logic: if you are an element who's parent has also registered to this form, assume your parent is in charge of this submission.\r\n\r\nLanding this without the other 3 means that a `paper-textarea`and and a `iron-autogrow-textarea` will be submitted twice.\r\n\r\nRelated PRs:\r\n- https://github.com/PolymerElements/iron-autogrow-textarea/pull/74\r\n- https://github.com/PolymerElements/paper-input/pull/342","created_at":"2016-02-18T02:19:31Z","updated_at":"2016-02-18T19:06:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6d68e2ca26e362a934cad9e89f449b057504d26","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110/commits","review_comments_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110/comments","review_comment_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/110/comments","statuses_url":"https://api.github.com/repos/PolymerElements/iron-form/statuses/bfe79f6278691df306a1c4895d54e8e65f633240","head":{"label":"PolymerElements:fix-double-submissions","ref":"fix-double-submissions","sha":"bfe79f6278691df306a1c4895d54e8e65f633240","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":35520464,"name":"iron-form","full_name":"PolymerElements/iron-form","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/iron-form","description":"Custom form element","fork":false,"url":"https://api.github.com/repos/PolymerElements/iron-form","forks_url":"https://api.github.com/repos/PolymerElements/iron-form/forks","keys_url":"https://api.github.com/repos/PolymerElements/iron-form/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/iron-form/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/iron-form/teams","hooks_url":"https://api.github.com/repos/PolymerElements/iron-form/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/iron-form/events","assignees_url":"https://api.github.com/repos/PolymerElements/iron-form/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/iron-form/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/iron-form/tags","blobs_url":"https://api.github.com/repos/PolymerElements/iron-form/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/iron-form/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/iron-form/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/iron-form/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/iron-form/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/iron-form/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/iron-form/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/iron-form/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/iron-form/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/iron-form/subscription","commits_url":"https://api.github.com/repos/PolymerElements/iron-form/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/iron-form/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/iron-form/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/iron-form/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/iron-form/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/iron-form/merges","archive_url":"https://api.github.com/repos/PolymerElements/iron-form/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/iron-form/downloads","issues_url":"https://api.github.com/repos/PolymerElements/iron-form/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/iron-form/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/iron-form/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/iron-form/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/iron-form/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerElements/iron-form/deployments","created_at":"2015-05-13T01:01:02Z","updated_at":"2016-02-07T15:16:25Z","pushed_at":"2016-02-18T03:29:13Z","git_url":"git://github.com/PolymerElements/iron-form.git","ssh_url":"git@github.com:PolymerElements/iron-form.git","clone_url":"https://github.com/PolymerElements/iron-form.git","svn_url":"https://github.com/PolymerElements/iron-form","homepage":"https://elements.polymer-project.org/elements/iron-form?view=demo:demo/index.html","size":170,"stargazers_count":17,"watchers_count":17,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":15,"forks":38,"open_issues":15,"watchers":17,"default_branch":"master"}},"base":{"label":"PolymerElements:master","ref":"master","sha":"5ed097423b2e6c3ff71a2ba6c79db663df22487d","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":35520464,"name":"iron-form","full_name":"PolymerElements/iron-form","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/iron-form","description":"Custom form element","fork":false,"url":"https://api.github.com/repos/PolymerElements/iron-form","forks_url":"https://api.github.com/repos/PolymerElements/iron-form/forks","keys_url":"https://api.github.com/repos/PolymerElements/iron-form/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/iron-form/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/iron-form/teams","hooks_url":"https://api.github.com/repos/PolymerElements/iron-form/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/iron-form/events","assignees_url":"https://api.github.com/repos/PolymerElements/iron-form/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/iron-form/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/iron-form/tags","blobs_url":"https://api.github.com/repos/PolymerElements/iron-form/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/iron-form/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/iron-form/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/iron-form/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/iron-form/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/iron-form/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/iron-form/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/iron-form/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/iron-form/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/iron-form/subscription","commits_url":"https://api.github.com/repos/PolymerElements/iron-form/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/iron-form/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/iron-form/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/iron-form/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/iron-form/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/iron-form/merges","archive_url":"https://api.github.com/repos/PolymerElements/iron-form/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/iron-form/downloads","issues_url":"https://api.github.com/repos/PolymerElements/iron-form/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/iron-form/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/iron-form/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/iron-form/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/iron-form/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/iron-form/releases{/id}","deployments_url":"https://api.github.com/repos/PolymerElements/iron-form/deployments","created_at":"2015-05-13T01:01:02Z","updated_at":"2016-02-07T15:16:25Z","pushed_at":"2016-02-18T03:29:13Z","git_url":"git://github.com/PolymerElements/iron-form.git","ssh_url":"git@github.com:PolymerElements/iron-form.git","clone_url":"https://github.com/PolymerElements/iron-form.git","svn_url":"https://github.com/PolymerElements/iron-form","homepage":"https://elements.polymer-project.org/elements/iron-form?view=demo:demo/index.html","size":170,"stargazers_count":17,"watchers_count":17,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":15,"forks":38,"open_issues":15,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110"},"html":{"href":"https://github.com/PolymerElements/iron-form/pull/110"},"issue":{"href":"https://api.github.com/repos/PolymerElements/iron-form/issues/110"},"comments":{"href":"https://api.github.com/repos/PolymerElements/iron-form/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerElements/iron-form/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerElements/iron-form/statuses/bfe79f6278691df306a1c4895d54e8e65f633240"}}}}