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
[HOLD for payment 2023-05-16] [$1000] Request/Split/Send - There is NO cursor in the description input field #17579
changed the title [-]REquest/Split/Send - There is NO cursor in the description input field[/-][+]Request/Split/Send - There is NO cursor in the description input field[/+]on Apr 18, 2023
Please re-state the problem that we are trying to solve in this issue.
Request/Split/Send - There is NO cursor in the description input field
What is the root cause of that problem?
The root cause of this issue is that we do not have the autoFocus property set on the input here.
What changes do you think we should make in order to solve the problem?
We can add autoFocus property to the text input here.
However, as mentioned by @tienifr in his proposal, adding a plain autofocus property would sometimes cause the field to be focused without the keyboard being opened in Android. We thus need to apply the autoFocus property only after the screen transition is complete. This can be done simply by providing a callback to the ScreenWrapper component that focuses the input once the transition is complete. This is currently done at several places right now and adding this here again would be a clear violation of the DRY principle.
We can remove this logic by creating a Context that wraps the ScreenWrapperhere. It will look like the following:
changed the title [-]Request/Split/Send - There is NO cursor in the description input field[/-][+][$1000] Request/Split/Send - There is NO cursor in the description input field[/+]on Apr 21, 2023
Just a reminder to add these to PR checklist I suggest.
Especially, auto-focus issues keep growing. They are easily missed when implement new pages
i.e. #18660#18371
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
[@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
We have an issue on mWeb/Safari (reproducible only on real device). Those issues exists in these places. @tgolen had suggested all those cases to be handled here. I am little confused on the next step now.
Ah, so it looks like none of those other places were fixed in the current PR (I kinda forgot about them). At this point, we'll need to open up a new issue to have those other places fixed.
Activity
MelvinBot commentedon Apr 18, 2023
Triggered auto assignment to @arielgreen (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.MelvinBot commentedon Apr 18, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]REquest/Split/Send - There is NO cursor in the description input field[/-][+]Request/Split/Send - There is NO cursor in the description input field[/+]allroundexperts commentedon Apr 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Request/Split/Send - There is NO cursor in the description input field
What is the root cause of that problem?
The root cause of this issue is that we do not have the
autoFocusproperty set on the input here.What changes do you think we should make in order to solve the problem?
We can add
autoFocusproperty to the text input here.However, as mentioned by @tienifr in his proposal, adding a plain autofocus property would sometimes cause the field to be focused without the keyboard being opened in Android. We thus need to apply the
autoFocusproperty only after the screen transition is complete. This can be done simply by providing a callback to theScreenWrappercomponent that focuses the input once the transition is complete. This is currently done at several places right now and adding this here again would be a clear violation of the DRY principle.We can remove this logic by creating a
Contextthat wraps theScreenWrapperhere. It will look like the following:Then we can use the above context in the
TextInputcomponent and focus only if thedidScreenTransitionEndistrue. This logic can be added here:We'll need to create a
HOCthat consumes theScreenWrapperContextand injects the value of the context inside theTextInputcomponent.By using the above approach, we'll essentially make sure that the
TextInputauto focus in Android is fixed once and for all.What alternative solutions did you explore? (Optional)
None
arielgreen commentedon Apr 21, 2023
Reproduced, I agree that we should have the cursor automatically in the description field here.
[-]Request/Split/Send - There is NO cursor in the description input field[/-][+][$1000] Request/Split/Send - There is NO cursor in the description input field[/+]MelvinBot commentedon Apr 21, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01c4252f7d1c570de7
MelvinBot commentedon Apr 21, 2023
Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new.
63 remaining items
Natnael-Guchima commentedon May 11, 2023
Accepted. Thanks, @arielgreen.
situchan commentedon May 11, 2023
Just a reminder to add these to PR checklist I suggest.
Especially, auto-focus issues keep growing. They are easily missed when implement new pages
i.e. #18660 #18371
arielgreen commentedon May 17, 2023
Calculating payments:
1 business days = 50% bonus
$500 to @Natnael-Guchima
$1000 + 50% = $1500 to @tienifr
$1000 + 50% = $1500 to @sobitneupane
All payments have been issued.
arielgreen commentedon May 17, 2023
@sobitneupane can you please review and complete the checklist? Once that's done we are good to close this.
sobitneupane commentedon May 17, 2023
#16919
#16919 (comment)
sobitneupane commentedon May 17, 2023
We have an issue on mWeb/Safari (reproducible only on real device). Those issues exists in these places. @tgolen had suggested all those cases to be handled here. I am little confused on the next step now.
tgolen commentedon May 19, 2023
Ah, so it looks like none of those other places were fixed in the current PR (I kinda forgot about them). At this point, we'll need to open up a new issue to have those other places fixed.
tgolen commentedon May 22, 2023
@kbecciv How do you want to handle fixing the other places?
arielgreen commentedon May 23, 2023
Discussing in Slack here.
arielgreen commentedon May 25, 2023
Creating a new issue for this, we're done here.