[PR #5987] [MERGED] Fix InitialFocus not working on some fields #36451

Closed
opened 2026-04-20 23:18:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5987
Author: @joel-jeremy
Created: 10/22/2025
Status: Merged
Merged: 10/23/2025
Merged by: @joel-jeremy

Base: masterHead: fix-InitialFocus


📝 Commits (9)

📊 Changes

13 files changed (+179 additions, -146 deletions)

View changed files

📝 packages/component-library/src/InitialFocus.ts (+9 -3)
📝 packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-6-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/accounts/Header.tsx (+1 -1)
📝 packages/desktop-client/src/components/common/Search.tsx (+3 -3)
📝 packages/desktop-client/src/components/mobile/MobileForms.tsx (+83 -77)
📝 packages/desktop-client/src/components/modals/CoverModal.tsx (+18 -3)
📝 packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx (+19 -22)
📝 packages/desktop-client/src/components/schedules/ScheduleLink.tsx (+15 -10)
📝 packages/desktop-client/src/components/select/DateSelect.tsx (+10 -14)
📝 packages/desktop-client/src/components/util/AmountInput.tsx (+11 -9)
📝 packages/desktop-client/src/components/util/GenericInput.jsx (+2 -2)
📝 packages/desktop-client/src/hooks/useMergedRefs.ts (+2 -2)
upcoming-release-notes/5987.md (+6 -0)

📄 Description

Renamed some component's inputRef prop to a standard ref. InitialFocus expects its child component to have a ref prop to work.

How to test:

  1. Open mobile budget page
  2. Do a balance transfer
  • The amount should be focused when the transfer modal is opened
  1. Cover a negative balance
  • The category autocomplete modal should automatically open (removing the need to click on the category button first)

🔄 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/5987 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 10/22/2025 **Status:** ✅ Merged **Merged:** 10/23/2025 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `fix-InitialFocus` --- ### 📝 Commits (9) - [`38eea5b`](https://github.com/actualbudget/actual/commit/38eea5be3398e9310d7a10f8fb4fad295a5067c1) Fix InitialFocus not working on some fields - [`24158c4`](https://github.com/actualbudget/actual/commit/24158c4da56db5ff8c09151c01ba73a6ac3dbeec) Fix typecheck and lint errors - [`ef48a39`](https://github.com/actualbudget/actual/commit/ef48a3909a9d1f34463afc8bf9398c14313cab3f) Fix lint error - [`ea5d05e`](https://github.com/actualbudget/actual/commit/ea5d05ed232afcd70ab42aa2ad134e1b9562b65c) Add ref type - [`1363dca`](https://github.com/actualbudget/actual/commit/1363dca51dc80cfb3438dc329360e724641fb19c) Add types - [`103579a`](https://github.com/actualbudget/actual/commit/103579a7e0b93b873dea29ad345c4d90b9608028) Update VRT screenshots - [`4221711`](https://github.com/actualbudget/actual/commit/42217118b5603178d0ae5ab64682c55c7dada5a6) Revert vrt - [`f977fbd`](https://github.com/actualbudget/actual/commit/f977fbd2ef15b0f310626c6c4b77f56ba80ecbe2) Update VRT screenshots - [`9f02db5`](https://github.com/actualbudget/actual/commit/9f02db5b4b65451660339e18b9f76ce4bac2a4a9) Cleanup ### 📊 Changes **13 files changed** (+179 additions, -146 deletions) <details> <summary>View changed files</summary> 📝 `packages/component-library/src/InitialFocus.ts` (+9 -3) 📝 `packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-6-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/accounts/Header.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/common/Search.tsx` (+3 -3) 📝 `packages/desktop-client/src/components/mobile/MobileForms.tsx` (+83 -77) 📝 `packages/desktop-client/src/components/modals/CoverModal.tsx` (+18 -3) 📝 `packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx` (+19 -22) 📝 `packages/desktop-client/src/components/schedules/ScheduleLink.tsx` (+15 -10) 📝 `packages/desktop-client/src/components/select/DateSelect.tsx` (+10 -14) 📝 `packages/desktop-client/src/components/util/AmountInput.tsx` (+11 -9) 📝 `packages/desktop-client/src/components/util/GenericInput.jsx` (+2 -2) 📝 `packages/desktop-client/src/hooks/useMergedRefs.ts` (+2 -2) ➕ `upcoming-release-notes/5987.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> Renamed some component's `inputRef` prop to a standard `ref`. `InitialFocus` expects its child component to have a `ref` prop to work. How to test: 1. Open mobile budget page 2. Do a balance transfer - The amount should be focused when the transfer modal is opened 3. Cover a negative balance - The category autocomplete modal should automatically open (removing the need to click on the category button first) --- <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-04-20 23:18:45 -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#36451