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

mWeb - Request Money - Search box is not auto focused when changing currency #4711

Closed
kavimuru opened this issue Aug 17, 2021 · 14 comments
Closed
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Aug 17, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue was found while executing PR #4662

Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Log in with any account and select any user
  3. Click on Plus and select Request Money
  4. Click on currency

Expected Result:

Cursor should appear after selecting a currency

Actual Result:

Search currency box should be autofocused according to PR steps. #4662

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web ✔️

Version Number: 1.0.86-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Bug5197704_Image_from_iOS__8_.mp4

Expensify/Expensify Issue URL:

View all open jobs on GitHub

@kavimuru kavimuru added the DeployBlockerCash This issue or pull request should block deployment label Aug 17, 2021
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Triggered auto assignment to @jasperhuangg (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico isagoico changed the title mWeb - Request Money - Cursor not appearing after selecting currency mWeb - Request Money - Search box is not auto focused when changing currency Aug 17, 2021
@isagoico
Copy link

Issue is still reproducible in 1.0.86-2 iOS mWeb only. Android mWeb is working as expected.

@luacmartins
Copy link
Contributor

Seems to be fixed in v1.0.86-3?

Screen.Recording.2021-08-18.at.5.20.52.PM.mov

@jasperhuangg
Copy link
Contributor

@luacmartins Seems like it's only an issue on a physical device, just tried it on my iPhone and it's not pulling up the keyboard, however the styles for focus are being applied on the text input.

I don't think this should be a deploy blocker though.

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Aug 19, 2021

I need to head out right now so I'm going to unassign myself and find help, but I got really close to figuring out a solution:

So if you pass autoFocus as true into here the input actually autofocuses correctly, but it conflicts with the animations we have for navigation screens since I think iOS has a requirement for any focused text inputs to always be entirely visible on screen. It makes it look super janky:

RPReplay_Final1629339877.MP4

I think a possible solution would be to delay focusing the text input until after the animation finishes. However, I tried sticking this block in the componentDidMount to no success, so I don't know if there's a straightforward way to programmatically focus text inputs with a delay.

setTimeout(() => this.textInput.focus(), 2000);

// just in case
setTimeout(() => this.textInput.current.focus(), 2000);

@jasperhuangg jasperhuangg removed their assignment Aug 19, 2021
@parasharrajat
Copy link
Member

IOS Safari will block any kind of focus that is applied asynchronously which means inside settimeout or Interaction Manager.

I am sure we can't do anything to fix this. Previously, we moved on to leave this as it is and I think best would be to do thr same now.

We cannot focus on the input in sync manner it will interfere with animations.

@Beamanator Beamanator removed the DeployBlockerCash This issue or pull request should block deployment label Aug 19, 2021
@Beamanator
Copy link
Contributor

Removed DeployBlockerCash label as it's not a critical change. Also @parasharrajat thanks for your input, I'm going to bring the conversation to #expensify-open-source and tag you - would you mind trying to find where this was previously discussed so we can link it here?

@parasharrajat
Copy link
Member

parasharrajat commented Aug 19, 2021

Oh, sorry. Actually, I think I might have confused this with the keyboard state. So here is TLDR #3604 (comment).
It should focus but the keyboard does not open. But seems this is the real issue from the video.

@Beamanator Beamanator self-assigned this Aug 19, 2021
@Beamanator Beamanator added the External Added to denote the issue can be worked on by a contributor label Aug 19, 2021
@MelvinBot
Copy link

Triggered auto assignment to @NicMendonca (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MelvinBot MelvinBot added the Daily KSv2 label Aug 19, 2021
@Beamanator Beamanator removed the Hourly KSv2 label Aug 19, 2021
@Beamanator
Copy link
Contributor

@parasharrajat yeah it doesn't help much if the input is focused but the keyboard doesn't open 😅 but thanks for linking the related discussion! I opened up a conversation in #expensify-open-source here

@Beamanator
Copy link
Contributor

(not overdue... discussing if this should be closed as not worth the time)

@MelvinBot MelvinBot removed the Overdue label Aug 23, 2021
@isagoico
Copy link

Issue reproducible during KI retests

@Beamanator
Copy link
Contributor

Beamanator commented Aug 24, 2021

Discussed in Slack, decided to close (see slack channel for details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants