actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
14.25k stars 1.14k forks source link

[Bug]: When adding a new transaction by clicking the on the "Add" button, the payment/deposit amount doesn't get set correctly on the created transaction #1185

Open joel-jeremy opened 1 year ago

joel-jeremy commented 1 year ago

Verified issue does not already exist?

What happened?

When adding a new transaction by clicking on the Add button, the payment/deposit amount doesn't get set correctly (it's set to 0) on the created transaction.

What error did you receive?

No error but newly creating creating transaction has its amount set to 0.

Where are you hosting Actual?

Fly.io

What browsers are you seeing the problem on?

Chrome

Operating System

Mobile Device

Kidglove57 commented 1 year ago

I am using Safari mobile set to 85% zoom. This does occasionally happen to me but usually the transaction is created with the correct transaction amount. Occasionally I have had a duplicate transaction also created but with 0 amount.

joel-jeremy commented 1 year ago

This only seems to be present in mobile not in desktops.

MatissJanis commented 1 year ago

@joel-jeremy is this on the responsive transaction entry page or the desktop view?

joel-jeremy commented 1 year ago

I encounter this on the desktop view

MatissJanis commented 1 year ago

Given we now have mobile transaction entry for mobile users - I'd say this is no longer applicable. What do you think?

kyrias commented 1 year ago

There's still the problem of split transactions not being implemented in the mobile view yet.

MatissJanis commented 1 year ago

There's still the problem of split transactions not being implemented in the mobile view yet.

That's a separate issue (please open a new issue). Lets not scope creep.

Cldfire commented 1 year ago

Issue for split transactions in the mobile add transaction view is here: https://github.com/actualbudget/actual/issues/1352

joel-jeremy commented 1 year ago

I think we should still address this. Some mobile users might still use desktop view since some desktop features are not yet available in mobile.

LarsStegman commented 9 months ago

I also run into this. Notes are also not always included. I am using an iPad with iOS 17.2

rich-howell commented 9 months ago

Given we now have mobile transaction entry for mobile users - I'd say this is no longer applicable. What do you think?

It depends what you mean by Mobile if you are talking about hand held devices then you are correct, however iPads are still very much a problem, blank transactions get entered more often than not when creating a new transaction, which I did raise in #2105 I think this needs addressing, it plagues my workflow and really puts me off using the iPad at all for data entry into Actual.

This isn't restricted to iPads though, I am able to replicate the problem in the dev tools on Edge by setting the device to iPad, screenshots below

Steps to replicate

image

If you press Add again the transaction is added a second time but this time with the value.

image

LarsStegman commented 8 months ago

I looked into the code a little bit and it looks like the field that is in focus does not update its state before the onAdd logic runs, which causes the state to be set to null. Either the field should update its current value constantly or the focus should be removed from the current focussed field before the addTransaction logic is run.

I didn't manage to completely understand how the code works though, so I haven't been be to fix it yet.