{"action":"created","issue":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1844","repository_url":"https://api.github.com/repos/phoenixframework/phoenix","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1844/labels{/name}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1844/comments","events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1844/events","html_url":"https://github.com/phoenixframework/phoenix/issues/1844","id":168735215,"number":1844,"title":"link with non-get method and custom content doesn't work","user":{"login":"boydm","id":176561,"avatar_url":"https://avatars.githubusercontent.com/u/176561?v=3","gravatar_id":"","url":"https://api.github.com/users/boydm","html_url":"https://github.com/boydm","followers_url":"https://api.github.com/users/boydm/followers","following_url":"https://api.github.com/users/boydm/following{/other_user}","gists_url":"https://api.github.com/users/boydm/gists{/gist_id}","starred_url":"https://api.github.com/users/boydm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boydm/subscriptions","organizations_url":"https://api.github.com/users/boydm/orgs","repos_url":"https://api.github.com/users/boydm/repos","events_url":"https://api.github.com/users/boydm/events{/privacy}","received_events_url":"https://api.github.com/users/boydm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-01T20:31:12Z","updated_at":"2016-08-01T20:44:04Z","closed_at":null,"body":"### Environment\r\n\r\n* Elixir version (elixir -v): 1.3.1\r\n* Phoenix version (mix deps): 1.2.0\r\n* NodeJS version (node -v): v6.2.2\r\n* NPM version (npm -v): 3.9.5\r\n* Operating system: OSX 10.11.6\r\n* phoenix_haml: 0.2.2\r\n\r\n### Expected behavior\r\nnote: using phoenix_haml\r\n\r\n```elixir\r\n= link to: admin_invitation_path(@conn, :resend, invitation), method: :post do\r\n\t.glyphicon.glyphicon-repeat\r\n- end\r\n```\r\n\r\nshould create a link that hits the server with the :post method when clicked in the browser.\r\n\r\n### Actual behavior\r\n\r\nThe following html is generated:\r\n\r\n```html\r\n<form action=\"/admin/account/invitation/resend/2\" class=\"link\" method=\"post\"><input name=\"_csrf_token\" type=\"hidden\" value=\"aDlePBcWEU4ULgAILngiHV9QHBAAAAAA/tjXAWG7QAgmMWX695OtKA==\"><a data-submit=\"parent\" href=\"#\" rel=\"nofollow\">                <div class=\"glyphicon glyphicon-repeat\"></div>\r\n```\r\n\r\nHowever, clicking the link in the browser causes no action or errors at the server. It as if the phoenix js fails to recognize the link/form as a valid link to send with the post method.\r\n\r\n### Notes\r\nThe link\r\n\r\n```elixir\r\n= link \"R\", to: admin_invitation_path(@conn, :resend, invitation), method: :post\r\n```\r\nworks as expected on the same page.\r\n\r\nThe failing behaviour is the same for all non-get methods.\r\n\r\nLinks with custom content and the get method work fine."},"comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments/236701852","html_url":"https://github.com/phoenixframework/phoenix/issues/1844#issuecomment-236701852","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1844","id":236701852,"user":{"login":"boydm","id":176561,"avatar_url":"https://avatars.githubusercontent.com/u/176561?v=3","gravatar_id":"","url":"https://api.github.com/users/boydm","html_url":"https://github.com/boydm","followers_url":"https://api.github.com/users/boydm/followers","following_url":"https://api.github.com/users/boydm/following{/other_user}","gists_url":"https://api.github.com/users/boydm/gists{/gist_id}","starred_url":"https://api.github.com/users/boydm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boydm/subscriptions","organizations_url":"https://api.github.com/users/boydm/orgs","repos_url":"https://api.github.com/users/boydm/repos","events_url":"https://api.github.com/users/boydm/events{/privacy}","received_events_url":"https://api.github.com/users/boydm/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T20:44:04Z","updated_at":"2016-08-01T20:44:04Z","body":"phoenix_html 2.6.2 (Hex package) (mix)\r\n\r\nIt looks like it is failling the test on line 9 in phoenix_html.js (according to chrome). event.target doesn't have data-submit set.\r\n\r\nif(event.target && event.target.matches('a[data-submit=parent]')) {"}}
{"actor":{"display_login":"boydm"}}