{"action":"created","issue":{"url":"https://api.github.com/repos/rails/jquery-ujs/issues/319","labels_url":"https://api.github.com/repos/rails/jquery-ujs/issues/319/labels{/name}","comments_url":"https://api.github.com/repos/rails/jquery-ujs/issues/319/comments","events_url":"https://api.github.com/repos/rails/jquery-ujs/issues/319/events","html_url":"https://github.com/rails/jquery-ujs/issues/319","id":12808633,"number":319,"title":"Unexpected default behavior for browsers that don't support required input fields / form validation","user":{"login":"ahx","id":8669,"avatar_url":"https://avatars.githubusercontent.com/u/8669?v=3","gravatar_id":"","url":"https://api.github.com/users/ahx","html_url":"https://github.com/ahx","followers_url":"https://api.github.com/users/ahx/followers","following_url":"https://api.github.com/users/ahx/following{/other_user}","gists_url":"https://api.github.com/users/ahx/gists{/gist_id}","starred_url":"https://api.github.com/users/ahx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahx/subscriptions","organizations_url":"https://api.github.com/users/ahx/orgs","repos_url":"https://api.github.com/users/ahx/repos","events_url":"https://api.github.com/users/ahx/events{/privacy}","received_events_url":"https://api.github.com/users/ahx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2013-04-04T16:37:16Z","updated_at":"2015-01-14T23:45:20Z","closed_at":null,"body":"rails.js adds a behavior to forms so that these don't get submitted if there is a blank required input field. This results in unexpected behavior for browsers that don't support form validation.\r\n\r\nThe following demo uses jQuery 1.9.1 and the current rails.js.\r\nOpen http://jsfiddle.net/wqWMf/4/ in the current version of Safari (6.0.3)  and hit the submit button.\r\n\r\nCurrent behavior: Nothing happens\r\n\r\nExpected behavior:\r\n  Either a) the form should get submitted although the required field is missing\r\n  or b) jquery-ujs should add some default styling to highlight the missing fields. \r\n\r\nEverything works as expected with browsers that support form validation.\r\n\r\nI think the behavior should either be removed or we should have to opt-in explicitly like we are doing with the data-remote, data-confirm,… attributes.\r\n\r\nLiving in Railsland we know hot show error-messages coming from the server-side validations in forms. The current behavior breaks this, because the form does not get submitted and no error-messages get rendered.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rails/jquery-ujs/issues/comments/70015672","html_url":"https://github.com/rails/jquery-ujs/issues/319#issuecomment-70015672","issue_url":"https://api.github.com/repos/rails/jquery-ujs/issues/319","id":70015672,"user":{"login":"JangoSteve","id":93607,"avatar_url":"https://avatars.githubusercontent.com/u/93607?v=3","gravatar_id":"","url":"https://api.github.com/users/JangoSteve","html_url":"https://github.com/JangoSteve","followers_url":"https://api.github.com/users/JangoSteve/followers","following_url":"https://api.github.com/users/JangoSteve/following{/other_user}","gists_url":"https://api.github.com/users/JangoSteve/gists{/gist_id}","starred_url":"https://api.github.com/users/JangoSteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JangoSteve/subscriptions","organizations_url":"https://api.github.com/users/JangoSteve/orgs","repos_url":"https://api.github.com/users/JangoSteve/repos","events_url":"https://api.github.com/users/JangoSteve/events{/privacy}","received_events_url":"https://api.github.com/users/JangoSteve/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T23:45:20Z","updated_at":"2015-01-14T23:45:20Z","body":"@asafbrukarz In answering your question earlier, I totally missed the detail that your point was due to the fact the event is called `ajax:aborted:required` rather than to a misunderstanding as to the responsibilities of the library.\r\n\r\nYeah, that's a bad name for the event. Originally (when it was added and named), it was only for remote forms. Adding it for non-remote forms came later, and we just didn't change the name. I'd say we should change it, if I didn't think we should probably just move toward removing it instead."}}