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: Saving transactions on enter (#2744) #2765

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

dxnter
Copy link
Contributor

@dxnter dxnter commented May 31, 2022

GitHub Issue: #2744

Explanation of Bugfix/Feature/Modification:
This fixes both the original bug, along with the comment by @Numex106 described in the issue. Currently, these are how you can reproduce them.

  1. While adding a new transaction, if you don't tab through each input and instead manually click on an Outflow/Inflow input, skipping the Memo completely, the value will not be saved after pressing Enter
  2. While editing a transaction, if you do anything more than double-click an Outflow/Input value, (remove the entire value before adding a new one, use arrow keys to adjust a number, click additionally while the value is selected) the previous value will be kept after pressing Enter

The bug stems from the input value not being formatted by YNAB before saving. A fix was initially introduced in #2695 that removed focus from the input element. While triggering a blur event to remove focus works in some cases, the proposed solution is to instead trigger a down arrow keypress to allow YNAB to format the value.

This PR also relates to #2688 and may assist others who are having issues with this feature.

@dxnter dxnter changed the title fix: Fix saving transactions on enter (#2744) fix: Saving transactions on enter (#2744) May 31, 2022
Copy link
Member

@joshmadewell joshmadewell left a comment

Choose a reason for hiding this comment

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

Looks good for now! Thanks!

@joshmadewell joshmadewell merged commit b63c5fa into toolkit-for-ynab:main Jun 3, 2022
HelloThisIsFlo pushed a commit to HelloThisIsFlo/toolkit-for-ynab that referenced this pull request Oct 4, 2022
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.

None yet

2 participants