[PR #3274] [CLOSED] [WIP] Fix mobile transaction form requires additional click to unfocus amount input #102461

Closed
opened 2026-05-30 01:20:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3274
Author: @minajevs
Created: 8/16/2024
Status: ❌ Closed

Base: master ← Head: dm-fix-second-click-on-mobile-new-transaction


📝 Commits (10+)

  • bf965b1 Fix mobile transaction form requires additional click to unfocus amount input
  • 4132141 remove console.logs
  • f159765 Release note
  • c902193 Merge branch 'master' into dm-fix-second-click-on-mobile-new-transaction
  • a70a144 Merge branch 'master' into dm-fix-second-click-on-mobile-new-transaction
  • 04da995 Remove single active form hook
  • 1890304 remove controlled focus from FocusableAmountInput
  • 3951fad fix optional prop
  • 4c0d853 Remove erroneous import
  • b32ebdf fix lint errors

📊 Changes

6 files changed (+92 additions, -322 deletions)

View changed files

📝 packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx (+14 -9)
📝 packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (+70 -174)
📝 packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx (+1 -10)
📝 packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx (+1 -10)
➖ packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx (+0 -119)
➕ upcoming-release-notes/3274.md (+6 -0)

📄 Description

Closes #3268

So the "bug" happened because setTimeout in onBlur handler messed up event-loop. The current edited field was reset on the next cycle, after onClick handler of the next field was fired. Removing setTimeout linearizes event-loop and current edited field is reset before onClick is fired.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/3274 **Author:** [@minajevs](https://github.com/minajevs) **Created:** 8/16/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dm-fix-second-click-on-mobile-new-transaction` --- ### 📝 Commits (10+) - [`bf965b1`](https://github.com/actualbudget/actual/commit/bf965b181cfba678726e713f7162c09fdc14925a) Fix mobile transaction form requires additional click to unfocus amount input - [`4132141`](https://github.com/actualbudget/actual/commit/4132141c6ccc406f7fa6237da47701e3c6014bef) remove console.logs - [`f159765`](https://github.com/actualbudget/actual/commit/f1597650beec78882ddbae3144bba029037da8a5) Release note - [`c902193`](https://github.com/actualbudget/actual/commit/c902193c43b7de036d305721665fd2204037f688) Merge branch 'master' into dm-fix-second-click-on-mobile-new-transaction - [`a70a144`](https://github.com/actualbudget/actual/commit/a70a1442a871cd7fedcbaf9c6a7397b1c2e69961) Merge branch 'master' into dm-fix-second-click-on-mobile-new-transaction - [`04da995`](https://github.com/actualbudget/actual/commit/04da995e364ae25f1723a8aaea9fc5585c16648c) Remove single active form hook - [`1890304`](https://github.com/actualbudget/actual/commit/1890304fbdaee5d293d04face6f09113f8bae0c8) remove controlled focus from FocusableAmountInput - [`3951fad`](https://github.com/actualbudget/actual/commit/3951fad1b0c9eb33c258238afdf4f2f281541382) fix optional prop - [`4c0d853`](https://github.com/actualbudget/actual/commit/4c0d8536d3bf539d287adbbf59e316775ef65ed2) Remove erroneous import - [`b32ebdf`](https://github.com/actualbudget/actual/commit/b32ebdf950bfe0def814992232026e27ad547622) fix lint errors ### 📊 Changes **6 files changed** (+92 additions, -322 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx` (+14 -9) 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx` (+70 -174) 📝 `packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx` (+1 -10) 📝 `packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx` (+1 -10) ➖ `packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx` (+0 -119) ➕ `upcoming-release-notes/3274.md` (+6 -0) </details> ### 📄 Description Closes #3268 So the "bug" happened because `setTimeout` in `onBlur` handler messed up event-loop. The current edited field was reset on the next cycle, after `onClick` handler of the next field was fired. Removing `setTimeout` linearizes event-loop and current edited field is reset before `onClick` is fired. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-30 01:20:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#102461