{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5517","repository_url":"https://api.github.com/repos/angular-ui/bootstrap","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5517/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5517/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5517/events","html_url":"https://github.com/angular-ui/bootstrap/issues/5517","id":135321010,"number":5517,"title":"Hitting \"enter\" to accept the modal dialog","user":{"login":"huyph","id":3280795,"avatar_url":"https://avatars.githubusercontent.com/u/3280795?v=3","gravatar_id":"","url":"https://api.github.com/users/huyph","html_url":"https://github.com/huyph","followers_url":"https://api.github.com/users/huyph/followers","following_url":"https://api.github.com/users/huyph/following{/other_user}","gists_url":"https://api.github.com/users/huyph/gists{/gist_id}","starred_url":"https://api.github.com/users/huyph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyph/subscriptions","organizations_url":"https://api.github.com/users/huyph/orgs","repos_url":"https://api.github.com/users/huyph/repos","events_url":"https://api.github.com/users/huyph/events{/privacy}","received_events_url":"https://api.github.com/users/huyph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/component:%20modal","name":"component: modal","color":"ffffff"},{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/needs:%20info","name":"needs: info","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-22T05:21:34Z","updated_at":"2016-02-22T17:05:24Z","closed_at":null,"body":"### Bug description:\r\nI'd expect if the modal is wrapped inside a form, hitting \"enter\" should click `button type=\"submit\"`.\r\nBut that doesn't seem to be the case?. I know I can apply solution similar to the one mentioned here: http://stackoverflow.com/questions/21633422/angularjs-accept-a-ui-bootstrap-modal-with-enter-key\r\n\r\nBut would be great if there is any easier way out of the UIBS?\r\n\r\n### Link to minimally-working plunker that reproduces the issue:\r\nhttp://plnkr.co/edit/PD7Fq8xYVdaH3mnHX28B?p=preview\r\n\r\n### Version of Angular, UIBS, and Bootstrap\r\nAngular: 1.4.9\r\nUIBS: 1.1.2\r\nBootstrap: 3.3.6\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/187270135","html_url":"https://github.com/angular-ui/bootstrap/issues/5517#issuecomment-187270135","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5517","id":187270135,"user":{"login":"sylouuu","id":2300259,"avatar_url":"https://avatars.githubusercontent.com/u/2300259?v=3","gravatar_id":"","url":"https://api.github.com/users/sylouuu","html_url":"https://github.com/sylouuu","followers_url":"https://api.github.com/users/sylouuu/followers","following_url":"https://api.github.com/users/sylouuu/following{/other_user}","gists_url":"https://api.github.com/users/sylouuu/gists{/gist_id}","starred_url":"https://api.github.com/users/sylouuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylouuu/subscriptions","organizations_url":"https://api.github.com/users/sylouuu/orgs","repos_url":"https://api.github.com/users/sylouuu/repos","events_url":"https://api.github.com/users/sylouuu/events{/privacy}","received_events_url":"https://api.github.com/users/sylouuu/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T17:05:24Z","updated_at":"2016-02-22T17:05:24Z","body":"Hi @huyph,\r\n\r\nFirst add `ng-submit` attribute in your form.\r\n\r\nThen don't forget to add `type=\"button\"` on your cancel button as all `<button>` are `submit` by default.\r\n\r\nHit enter after focusing in the input then check the console. http://plnkr.co/edit/PKpIi5cDsIYbHcyUjnVJ?p=preview\r\n\r\nBests"}}