{"action":"created","issue":{"url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/116","repository_url":"https://api.github.com/repos/phoenixframework/phoenix_html","labels_url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/116/comments","events_url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/116/events","html_url":"https://github.com/phoenixframework/phoenix_html/pull/116","id":178244023,"number":116,"title":"Submit nearest form even if not direct descendent","user":{"login":"troygnichols","id":221013,"avatar_url":"https://avatars.githubusercontent.com/u/221013?v=3","gravatar_id":"","url":"https://api.github.com/users/troygnichols","html_url":"https://github.com/troygnichols","followers_url":"https://api.github.com/users/troygnichols/followers","following_url":"https://api.github.com/users/troygnichols/following{/other_user}","gists_url":"https://api.github.com/users/troygnichols/gists{/gist_id}","starred_url":"https://api.github.com/users/troygnichols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troygnichols/subscriptions","organizations_url":"https://api.github.com/users/troygnichols/orgs","repos_url":"https://api.github.com/users/troygnichols/repos","events_url":"https://api.github.com/users/troygnichols/events{/privacy}","received_events_url":"https://api.github.com/users/troygnichols/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-21T04:34:34Z","updated_at":"2016-09-21T08:29:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix_html/pulls/116","html_url":"https://github.com/phoenixframework/phoenix_html/pull/116","diff_url":"https://github.com/phoenixframework/phoenix_html/pull/116.diff","patch_url":"https://github.com/phoenixframework/phoenix_html/pull/116.patch"},"body":"Hi! I'm not positive this is the right thing to do, but it solved a problem for me.\r\n\r\nSay I have a template like this:\r\n\r\n    <%= form_for ... do %>\r\n      <div id=\"foo\">\r\n        <%= link to: \"/somewhere\", class: \"fa fa-save\", data: [submit: \"parent\"] %>\r\n      </div>\r\n    <% end %>\r\n\r\n(I use `<a>` instead of `<submit>`  because I need to style the submit button with font-awesome icons e.g.)\r\n\r\nWith the original code, it tried to submit its immediate parent`div#foo`, which of course doesn't work. This PR looks for the nearest parent that is a form and submits that."},"comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/comments/248545608","html_url":"https://github.com/phoenixframework/phoenix_html/pull/116#issuecomment-248545608","issue_url":"https://api.github.com/repos/phoenixframework/phoenix_html/issues/116","id":248545608,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T08:29:08Z","updated_at":"2016-09-21T08:29:08Z","body":"@troygnichols unfortunately closest is not supported on internet explorer and on mobiles. :("}}
{"actor":{"display_login":"josevalim"}}