{"action":"opened","issue":{"url":"https://api.github.com/repos/Sage/carbon/issues/1813","repository_url":"https://api.github.com/repos/Sage/carbon","labels_url":"https://api.github.com/repos/Sage/carbon/issues/1813/labels{/name}","comments_url":"https://api.github.com/repos/Sage/carbon/issues/1813/comments","events_url":"https://api.github.com/repos/Sage/carbon/issues/1813/events","html_url":"https://github.com/Sage/carbon/issues/1813","id":349054331,"node_id":"MDU6SXNzdWUzNDkwNTQzMzE=","number":1813,"title":"Unable to submit Form via <Enter> key when using leftAlignedActions","user":{"login":"ianoxley","id":52329,"node_id":"MDQ6VXNlcjUyMzI5","avatar_url":"https://avatars3.githubusercontent.com/u/52329?v=4","gravatar_id":"","url":"https://api.github.com/users/ianoxley","html_url":"https://github.com/ianoxley","followers_url":"https://api.github.com/users/ianoxley/followers","following_url":"https://api.github.com/users/ianoxley/following{/other_user}","gists_url":"https://api.github.com/users/ianoxley/gists{/gist_id}","starred_url":"https://api.github.com/users/ianoxley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianoxley/subscriptions","organizations_url":"https://api.github.com/users/ianoxley/orgs","repos_url":"https://api.github.com/users/ianoxley/repos","events_url":"https://api.github.com/users/ianoxley/events{/privacy}","received_events_url":"https://api.github.com/users/ianoxley/received_events","type":"User","site_admin":false},"labels":[{"id":256427236,"node_id":"MDU6TGFiZWwyNTY0MjcyMzY=","url":"https://api.github.com/repos/Sage/carbon/labels/Bug","name":"Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-09T09:44:37Z","updated_at":"2018-08-09T09:44:37Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Given the following code:\r\n\r\n``` js\r\nconst deleteButton = () => (\r\n  <Button\r\n    onClick={ (e) => {\r\n      e.preventDefault(); \r\n      console.log('deleted');\r\n    }}\r\n  >\r\n    Delete\r\n  </Button>\r\n);\r\n\r\nconst MyExample = () => (\r\n  <AppWrapper>\r\n    <Form\r\n      leftAlignedActions={ deleteButton() }\r\n      cancel={ false }\r\n      onSubmit={ (e) => {\r\n        e.preventDefault();\r\n        console.log('submitted');\r\n      }}\r\n    >\r\n      <Textbox\r\n        label='Name'\r\n      />\r\n    </Form>\r\n  </AppWrapper>\r\n);\r\n\r\nReactDOM.render(<MyExample />, document.getElementById('app'));\r\n```\r\nCodepen: https://codepen.io/anon/pen/djQwJJ\r\n\r\nIf you try and submit the form using the `<Enter>` key the `Delete` button is triggered before the `Save` button, as the `Delete` button comes first in the HTML."}}
{"actor":{"display_login":"ianoxley"}}