[PR #1551] [MERGED] 🐛 Mobile entry will enter positive value instead of negative #18177

Closed
opened 2026-04-14 20:36:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1551
Author: @trevdor
Created: 8/20/2023
Status: Merged
Merged: 8/21/2023
Merged by: @trevdor

Base: masterHead: bug/1520-stop-being-so-positive


📝 Commits (2)

  • fb1266e 🐛 Mobile entry will enter positive value instead of negative
  • 38da382 release notes

📊 Changes

2 files changed (+15 additions, -4 deletions)

View changed files

📝 packages/desktop-client/src/components/mobile/MobileAmountInput.js (+9 -4)
upcoming-release-notes/1551.md (+6 -0)

📄 Description

Repro steps

  1. On mobile, on the new transaction screen, enter an Amount, but don't tap away from the Amount field
  2. Tap Add Transaction
  3. The amount entered is positive.
    • The amount here is negative if you first blur Amount, e.g. by editing another field like Payee before adding the transaction.

Root cause

Our FocusableAmountInput (used for mobile transaction entry) applies negation logic onBlur. We have some "queued changes" logic for catching values a person has changed but not "locked in" via blur -- this exact scenario. It catches the new value of Amount on every change. However, that onChange handler did not apply the negation logic that onBlur uses.

Solution

Ensure FocusableAmountInput used in MobileTransaction conditionally applies negation logic the same way onChange as it does onBlur.
The component should keep its internal value manipulations to itself and report a single value to consumers.

Fixes #1520


🔄 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/1551 **Author:** [@trevdor](https://github.com/trevdor) **Created:** 8/20/2023 **Status:** ✅ Merged **Merged:** 8/21/2023 **Merged by:** [@trevdor](https://github.com/trevdor) **Base:** `master` ← **Head:** `bug/1520-stop-being-so-positive` --- ### 📝 Commits (2) - [`fb1266e`](https://github.com/actualbudget/actual/commit/fb1266e1cc9d37bc87b2fa3da1bfd6ca753cc064) :bug: Mobile entry will enter positive value instead of negative - [`38da382`](https://github.com/actualbudget/actual/commit/38da3825a73648f7589f824f658a032a10a56503) release notes ### 📊 Changes **2 files changed** (+15 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/mobile/MobileAmountInput.js` (+9 -4) ➕ `upcoming-release-notes/1551.md` (+6 -0) </details> ### 📄 Description ### Repro steps 1. On mobile, on the new transaction screen, enter an Amount, but don't tap away from the Amount field 2. Tap `Add Transaction` 3. The amount entered is positive. * The amount here is negative if you first blur Amount, e.g. by editing another field like Payee before adding the transaction. ### Root cause Our FocusableAmountInput (used for mobile transaction entry) applies negation logic `onBlur`. We have some "queued changes" logic for catching values a person has changed but not "locked in" via blur -- this exact scenario. It catches the new value of Amount on every change. However, that `onChange` handler did not apply the negation logic that `onBlur` uses. ### Solution Ensure `FocusableAmountInput` used in `MobileTransaction` conditionally applies negation logic the same way `onChange` as it does `onBlur`. The component should keep its internal value manipulations to itself and report a single value to consumers. Fixes #1520 --- <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-14 20:36:56 -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#18177