Skip to content

Commit

Permalink
Fix submit form on enter key pressed (actualbudget#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
syukronrm committed Sep 5, 2023
1 parent 5a58b30 commit 1a22f5c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/desktop-client/src/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
{...(typeof as === 'string'
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
(css(buttonStyle) as any)
: { style: buttonStyle, type: isSubmit ? 'submit' : 'button' })}
: { style: buttonStyle })}
disabled={disabled}
type={isSubmit ? 'submit' : 'button'}
{...nativeProps}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default function FixEncryptionKey({
<Button
style={{ marginRight: 10 }}
onClick={() => modalProps.onBack()}
type="button"
type="normal"
>
Back
</Button>
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1634.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [syukronrm]
---

Fix pressing Enter on Encryption Key cancels entry instead of update the key

0 comments on commit 1a22f5c

Please sign in to comment.