Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix submit form on enter key pressed #1634

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

syukronrm
Copy link
Contributor

Fix #1582

Root Cause
Adding prop type="button" on <Button> doesn't work because it doesn't proparagated to HTML <button>.

Changes

  • On Back button: add isSubmit=false.
  • On Button component: Any <Button> with prop type="primary" should have be propagated as <button type="submit">, except if it's explicitly has prop isSubmit=false.

@netlify
Copy link

netlify bot commented Sep 2, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit adf4328
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/64f681de5499f700083bdbb5
😎 Deploy Preview https://deploy-preview-1634.demo.actualbudget.org/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2023

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
15 2.27 MB → 2.27 MB (-545 B) -0.02%
Changeset
File Δ Size
src/components/budget/MobileBudgetTable.js 📉 -671 B (-3.16%) 20.73 kB → 20.07 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
static/js/narrow-components.chunk.js 25.02 kB → 24.49 kB (-545 B) -2.13%

Unchanged

Asset File Size % Changed
static/js/main.js 967.61 kB 0%
static/js/171.chunk.js 396.24 kB 0%
static/media/Inter-italic.var.woff2 239.29 kB 0%
static/media/Inter-roman.var.woff2 221.86 kB 0%
static/js/894.chunk.js 145.89 kB 0%
static/js/wide-components.chunk.js 135.42 kB 0%
static/js/383.chunk.js 117.35 kB 0%
static/js/reports.chunk.js 40.53 kB 0%
static/js/969.chunk.js 12.94 kB 0%
static/js/resize-observer-polyfill.chunk.js 8.12 kB 0%
static/css/main.css 5.82 kB 0%
asset-manifest.json 1.92 kB 0%
index.html 1.66 kB 0%
static/media/browser-server.js 963 B 0%

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2023

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
2 2.07 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.09 MB 0%
xfo.xfo.kcab.worker.js 1004.04 kB 0%

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description does not seem to match with the code changes. Are we missing some commits? 🤔

Also cc @shall0pass can you please verify if this fixes the bug you reported?

@@ -127,7 +127,8 @@ export default function FixEncryptionKey({
<Button
style={{ marginRight: 10 }}
onClick={() => modalProps.onBack()}
type="button"
type="normal"
isSubmit={false}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: ‏setting isSubmit is unnecessary here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes you're right

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MatissJanis updated!

@shall0pass
Copy link
Contributor

This works correctly for me. Thanks!

@MatissJanis MatissJanis merged commit 108daed into actualbudget:master Sep 5, 2023
19 checks passed
@MatissJanis
Copy link
Member

Thanks!

@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review ✨ Merged Pull Request has been merged successfully labels Sep 5, 2023
@syukronrm syukronrm deleted the fix-enter-key branch September 5, 2023 08:48
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Pressing Enter on Encryption Key cancels entry
3 participants