Skip to content

A local-first personal finance app

Fix enter to create accounts

Ezekiel Elin55b9a0e7ef15
diff --git a/packages/loot-design/src/components/common.js b/packages/loot-design/src/components/common.js
index b54c259f90..766d4bc89e 100644
--- a/packages/loot-design/src/components/common.js
+++ b/packages/loot-design/src/components/common.js
@@ -935,10 +935,6 @@ export function ModalButtons({
style
]}
>
- {/* Add a dummy button first so that when a user
- presses "enter" they do a normal submit, instead of
- activating the back button */}
- <Button data-hidden={true} style={{ display: 'none' }} />
{leftContent}
<View style={{ flex: 1 }} />
{children}
diff --git a/packages/loot-design/src/components/modals/CreateLocalAccount.js b/packages/loot-design/src/components/modals/CreateLocalAccount.js
index 459f4e1849..064b81685a 100644
--- a/packages/loot-design/src/components/modals/CreateLocalAccount.js
+++ b/packages/loot-design/src/components/modals/CreateLocalAccount.js
@@ -143,7 +143,9 @@ function CreateLocalAccount({ modalProps, actions, history }) {
)}
<ModalButtons>
- <Button onClick={() => modalProps.onBack()}>Back</Button>
+ <Button onClick={() => modalProps.onBack()} type="button">
+ Back
+ </Button>
<Button primary style={{ marginLeft: 10 }}>
Create
</Button>