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] mWeb - The keyboard opens after requesting money in 1:1 DM #31588
Version Number: 1.4.1.5 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
changed the title [-]mWeb - The keyboard opens after requesting money in 1:1 DM[/-][+][$500] mWeb - The keyboard opens after requesting money in 1:1 DM[/+]on Nov 20, 2023
Please re-state the problem that we are trying to solve in this issue.
mWeb - The keyboard opens after requesting money in 1:1 DM
What is the root cause of that problem?
When the modal is closed there is a solution in the ComposerWithSuggestions to focus on the Compose field. In this solution, there is a condition to avoid the focus on native platforms, but the mWeb view is not present in this condition.
What changes do you think we should make in order to solve the problem?
We should replace the condition to use shouldFocusInputOnScreenFocus in place of the willBlurTextInputOnTapOutside:
For example,
useEffect(()=>{if(modal.isVisible&&!prevIsModalVisible){// eslint-disable-next-line no-param-reassignisNextModalWillOpenRef.current=false;}// We want to focus or refocus the input when a modal has been closed or the underlying screen is refocused.// We avoid doing this on native platforms since the software keyboard popping// open creates a jarring and broken UX.if(!(shouldFocusInputOnScreenFocus&&!isNextModalWillOpenRef.current&&!modal.isVisible&&isFocused&&(prevIsModalVisible||!prevIsFocused))){return;}if(editFocused){InputFocus.inputFocusChange(false);return;}focus();},[focus,prevIsFocused,editFocused,prevIsModalVisible,isFocused,modal.isVisible,isNextModalWillOpenRef]);
What alternative solutions did you explore? (Optional)
N/A
POC
poc-issue-31588.mp4
Evidence with the focus using a Desktop Browser
Note: It's just evidence to ensure that the focus still working in the Desktop Browser
@wlegolas Thanks for the proposal. Your RCA makes sense. The solution would work but I think we can just use shouldFocusInputOnScreenFocus condition instead of willBlurTextInputOnTapOutside. If that looks good please update your proposal and tag me again.
Reacted by Weslley Alves de Oliveira and Jasper Huang
📣 @wlegolas 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
Sorry for late. This was dupe of #27540.
I didn't approve same proposal because it still didn't meet the expected behavior.
We should fix refocus behavior globally, not only native vs mWeb inconsistency.
Also, I suggest to hold this for #29199
Hi @0xmiroslav and @s77rt do I need to stop the changes that I'm working on?
I almost finished the changes and I'm just trying to generate the last test evidence using the Android Native. For all the other platforms I created the test evidence.
Activity
[-]mWeb - The keyboard opens after requesting money in 1:1 DM[/-][+][$500] mWeb - The keyboard opens after requesting money in 1:1 DM[/+]melvin-bot commentedon Nov 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01cf43a55cc9e8c20b
melvin-bot commentedon Nov 20, 2023
Triggered auto assignment to @strepanier03 (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)wlegolas commentedon Nov 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
mWeb - The keyboard opens after requesting money in 1:1 DM
What is the root cause of that problem?
When the modal is closed there is a solution in the
ComposerWithSuggestionsto focus on the Compose field. In this solution, there is a condition to avoid the focus on native platforms, but the mWeb view is not present in this condition.App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js
Lines 491 to 496 in d15f6dc
What changes do you think we should make in order to solve the problem?
We should replace the condition to use
shouldFocusInputOnScreenFocusin place of thewillBlurTextInputOnTapOutside:For example,
What alternative solutions did you explore? (Optional)
N/A
POC
poc-issue-31588.mp4
Evidence with the focus using a Desktop Browser
Note: It's just evidence to ensure that the focus still working in the Desktop Browser
regration-test-evidence.mov
s77rt commentedon Nov 21, 2023
@wlegolas Thanks for the proposal. Your RCA makes sense. The solution would work but I think we can just use
shouldFocusInputOnScreenFocuscondition instead ofwillBlurTextInputOnTapOutside. If that looks good please update your proposal and tag me again.wlegolas commentedon Nov 21, 2023
Hi @s77rt thank you for your suggestion.
I tested it here and works as expected, I updated my proposal to make this change.
s77rt commentedon Nov 22, 2023
@wlegolas Thanks for the confirmation. Let's get this fixed 🚀
🎀 👀 🎀 C+ reviewed
Link to proposal
5 remaining items
s77rt commentedon Nov 27, 2023
@jasperhuangg #31588 (comment)
melvin-bot commentedon Nov 29, 2023
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
melvin-bot commentedon Nov 29, 2023
📣 @wlegolas 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
strepanier03 commentedon Nov 30, 2023
We're good here Melvin, assignment has been completed.
0xmiroslav commentedon Nov 30, 2023
Sorry for late. This was dupe of #27540.
I didn't approve same proposal because it still didn't meet the expected behavior.
We should fix refocus behavior globally, not only native vs mWeb inconsistency.
Also, I suggest to hold this for #29199
wlegolas commentedon Nov 30, 2023
Hi @0xmiroslav and @s77rt do I need to stop the changes that I'm working on?
I almost finished the changes and I'm just trying to generate the last test evidence using the Android Native. For all the other platforms I created the test evidence.
0xmiroslav commentedon Nov 30, 2023
I think so. As you see, that code part is being fully removed here - https://github.com/Expensify/App/pull/29199/files#diff-4e5fc12f136b6de8d193f9da851a61da009309c463307e00f444aaf0cd55fdd6L491-L510
jasperhuangg commentedon Nov 30, 2023
Got it, sorry for the confusioin @wlegolas, let's go ahead and close this out.