You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Send money - Enter keypress on amount page triggers pay with expensify popup and displays in corner #29608
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Please re-state the problem that we are trying to solve in this issue.
Enter keypress on amount page triggers the pay with expensify popup which is present in the prev page
What is the root cause of that problem?
user goes to confimation list then to the amount page then back to the confirmation...
on back from the amount page, the confirmation page opens the same ref
What changes do you think we should make in order to solve the problem?
enforce fallback route when going back from the amount page so that it respwans the confirmation list page ,,, the same as we are doing in the other request money pages .
changed the title [-]Send money - Enter keypress on amount page triggers pay with expensify popup and displays in corner[/-][+][$500] Send money - Enter keypress on amount page triggers pay with expensify popup and displays in corner[/+]on Oct 14, 2023
If we allow a bubble for a keyboard shortcut, it will continue to execute the other registered (same-key) keyboard shortcut callback. For example, if we register 2 enter shortcuts and allow it to bubble on the first shortcut, it will trigger both shortcut callbacks. If we don't allow it to bubble, then only the first shortcut will be executed.
It is to fix this issue on the money request page where we have 2 CTA buttons, 1 on the Manual tab and 1 on the Distance Tab. We want both buttons to be executed when pressing Enter. If we don't allow both, then only the last registered enter shortcut will be executed, that is the Distance tab CTA button.
When we visit the edit amount page and press enter, there will be 2 enter shortcut buttons executed. First is the edit amount Save button and then the "Request $x" button on the confirmation page (remember that we allow bubble on the amount page CTA button) is executed later.
We actually prevent the button from being executed if not focused here,
however, pressing the Save of edit amount page will navigate the user back to the confirm page and when the 2nd enter shortcut callback (Request $x) is executed, the confirm page is already focused, so it gets executed.
What changes do you think we should make in order to solve the problem?
On the edit amount page, we only have 1 CTA button, so it makes sense to not allow the shortcut bubble on edit page.
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
abzokhattab commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Enter keypress on amount page triggers the pay with expensify popup which is present in the prev page
What is the root cause of that problem?
user goes to confimation list then to the amount page then back to the confirmation...
on back from the amount page, the confirmation page opens the same ref
What changes do you think we should make in order to solve the problem?
enforce fallback route when going back from the amount page so that it respwans the confirmation list page ,,, the same as we are doing in the other request money pages .
App/src/pages/iou/steps/NewRequestAmountPage.js
Line 145 in 2c9c303
to
POC
Screen.Recording.2023-10-14.at.3.52.06.AM.mov
melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to @twisterdotcom (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-]Send money - Enter keypress on amount page triggers pay with expensify popup and displays in corner[/-][+][$500] Send money - Enter keypress on amount page triggers pay with expensify popup and displays in corner[/+]melvin-bot commentedon Oct 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01620c1716cd0baeb7
melvin-bot commentedon Oct 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)saranshbalyan-1234 commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Enter keypress on amount page triggers pay with expensify popup and displays in corner
What is the root cause of that problem?
the RCA is that we are passing pressOnEnter here in the settlementButton component here
https://github.com/Expensify/App/blob/fe282b45cb13e01519282ccc023e5bfbd7714158/src/components/MoneyRequestConfirmationList.js#L495-L510What changes do you think we should make in order to solve the problem?
We can just remove this prop and enter button functionality will not work anymore
What alternative solutions did you explore? (Optional)
N/A
melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)bernhardoj commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Pressing enter on the edit amount page will save the amount but also submit the money request.
What is the root cause of that problem?
This is a regression from #28374 where we allow the enter shortcut event bubble on the amount request form component.
App/src/pages/iou/steps/MoneyRequestAmountForm.js
Lines 284 to 286 in fe282b4
If we allow a bubble for a keyboard shortcut, it will continue to execute the other registered (same-key) keyboard shortcut callback. For example, if we register 2 enter shortcuts and allow it to bubble on the first shortcut, it will trigger both shortcut callbacks. If we don't allow it to bubble, then only the first shortcut will be executed.
It is to fix this issue on the money request page where we have 2 CTA buttons, 1 on the Manual tab and 1 on the Distance Tab. We want both buttons to be executed when pressing Enter. If we don't allow both, then only the last registered enter shortcut will be executed, that is the Distance tab CTA button.
When we visit the edit amount page and press enter, there will be 2 enter shortcut buttons executed. First is the edit amount Save button and then the "Request $x" button on the confirmation page (remember that we allow bubble on the amount page CTA button) is executed later.
We actually prevent the button from being executed if not focused here,
App/src/components/Button/index.js
Lines 182 to 185 in fe282b4
however, pressing the Save of edit amount page will navigate the user back to the confirm page and when the 2nd enter shortcut callback (Request $x) is executed, the confirm page is already focused, so it gets executed.
What changes do you think we should make in order to solve the problem?
On the edit amount page, we only have 1 CTA button, so it makes sense to not allow the shortcut bubble on edit page.
saranshbalyan-1234 commentedon Oct 15, 2023
The corner display is will be handled here #29332
We just need to have handle enter function here
mkhutornyi commentedon Oct 15, 2023
Same root cause as #29051
cc: @eVoloshchak @parasharrajat
parasharrajat commentedon Oct 15, 2023
Its a duplicate issue.
twisterdotcom commentedon Oct 17, 2023
Okay, closing as dupe: #29051