Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.84.0
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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697207528874409
Action Performed:
- Open the app
- Open any report
- Send any message
- Edit the message
- Remove all text from message and press enter, it should open delete popup
- Press CTRL+J/CMD+J and observe that keyboard shortcut is opened but we can type in edit message
Expected Result:
App should not keep focus on edit message when we open keyboard shortcut using CTRL+J
Actual Result:
App keeps focus on edit message even when we open keyboard shortcut using CTRL+J
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android: Native
- Android: mWeb Chrome
- iOS: Native
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
windows.chrome.edit.focus.on.CTRL.J.mp4
mac.chrome.CTRL.J.edit.focus.mov
Recording.4992.mp4
MacOS: Desktop
mac.desktop.CTRL.J.edit.focus.mov
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0141276117edef8487
- Upwork Job ID: 1713214201330978816
- Last Price Increase: 2023-10-28
- Automatic offers:
- situchan | Contributor | 27503041
- dhanashree-sawant | Reporter | 27503043
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
abdel-h66 commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the delete comment modal is open, opening the right-hand navigation put the focus back on the comment edit field.
What is the root cause of that problem?
When the delete modal is canceled, it will automatically call the
onClosecallback that does the following:App/src/pages/home/report/ReportActionItemMessageEdit.js
Line 314 in fe282b4
So, in summary, the Right-hand navigation when opened it dismisses any open modals, causing the Delete modal
onCancelcallback to be triggered. And in our case it puts the focus back on the Text input.What changes do you think we should make in order to solve the problem?
Since I could not find a way to differentiate between the modal being closed by the user, or by Navigation, I decided to check for the active route when the action occurs.
So by checking if the active route is actual report using
We can then blur the text input whenever the route is not a report.
What alternative solutions did you explore? (Optional)
I tried to update the
onClosecallback to thisThis didn't work due to the fact that the modal is closed before the route changes. Meaning
isReportRoutewill always be true.N/A
melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-] Focus on edit when keyboard shortcut is open using CTRL+J[/-][+][$500] Focus on edit when keyboard shortcut is open using CTRL+J[/+]melvin-bot commentedon Oct 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0141276117edef8487
melvin-bot commentedon Oct 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr (
External)getusha commentedon Oct 14, 2023
@abdel-h66 @ArekChr just to drop a note here, we shouldn't use
InteractionManagerit will cause bugs after we upgrade react-native-web to the latest version, we experienced issues like this one #24482 (comment).abdel-h66 commentedon Oct 14, 2023
Does it mean we are dropping the
InteractionManager@getusha ? That was coming from the original implem by the way.getusha commentedon Oct 14, 2023
@abdel-h66 we have to, most of the time its solving issues because it wraps the callback passed in setTimeout, now it uses a task queue which is not ideal to handle input focus.
174 remaining items
tsa321 commentedon Mar 29, 2024
cc @zanyrenney
hayata-suenaga commentedon Apr 1, 2024
Zany has been OOO. She will come back online this week. Please wait a little bit for that 🙇 @tsa321
zanyrenney commentedon Apr 2, 2024
Hi @tsa321 I have just sent you a manual offer for the job, please accept.
zanyrenney commentedon Apr 2, 2024
@hayata-suenaga thanks for the message above, appreciate it! <3
zanyrenney commentedon Apr 2, 2024
not overdue!
tsa321 commentedon Apr 3, 2024
Thank you @zanyrenney , I have accepted the offer
hayata-suenaga commentedon Apr 12, 2024
waiting for payment
zanyrenney commentedon Apr 29, 2024
payment summary