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

[HOLD #15992][$1000] mWeb/Chrome - Chat - Android - keyboard opens when tapping outside of the edited message #16596

Closed
1 of 6 tasks
kbecciv opened this issue Mar 27, 2023 · 58 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Mar 27, 2023

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


Action Performed:

  1. Go to URL https://staging.new.expensify.com/ on Android/Chrome
  2. Login with any account
  3. Navigate a conversation (where there are messages)
  4. Tap and hold to view the action menu
  5. Tap on the Pencil icon to activate the edit message box
  6. Close keyboard
  7. Click outside the message
  8. Keyboard reopens

Expected Result:

Nothing should happen.

Actual Result:

If you edit a message, close the keyboard and click outside
this message, the keyboard reopens.

Workaround:

Unkonown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.94.0

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

Bug5995109_Screen_Recording_20230328_005926_Chrome.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015de52e231d8c70fe
  • Upwork Job ID: 1643325645053960192
  • Last Price Increase: 2023-04-11
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 27, 2023
@MelvinBot
Copy link

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Mar 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Christinadobrzyn Christinadobrzyn changed the title mWeb/Chrome - Chat - If you click outside of the edited message, the keyboard will open again mWeb/Chrome - Chat - Android - keyboard opens when tapping outside of the edited message Mar 29, 2023
@Christinadobrzyn
Copy link
Contributor

Hey @kbecciv I can't seem to test on Android/Chrome using Browserstack but this doesn't happen on any other platforms so can you make sure this is still happening?

@MelvinBot
Copy link

@kbecciv Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Apr 3, 2023
@Christinadobrzyn
Copy link
Contributor

pinging in QA for some help testing these - https://expensify.slack.com/archives/C9YU7BX5M/p1680624339701339

@melvin-bot melvin-bot bot removed the Overdue label Apr 4, 2023
@kbecciv
Copy link
Author

kbecciv commented Apr 4, 2023

@Christinadobrzyn Able to reproduce with latest build 1.2.94.0

Screen.Recording.20230404.193617.Chrome.mp4

@Christinadobrzyn
Copy link
Contributor

Thank you @kbecciv I think this should get fixed, going to add External label.

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Apr 4, 2023
@melvin-bot melvin-bot bot changed the title mWeb/Chrome - Chat - Android - keyboard opens when tapping outside of the edited message [$1000] mWeb/Chrome - Chat - Android - keyboard opens when tapping outside of the edited message Apr 4, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~015de52e231d8c70fe

@MelvinBot
Copy link

Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 4, 2023
@MelvinBot
Copy link

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

@redstar504
Copy link
Contributor

redstar504 commented Apr 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

When edit composer is focused, and you close the keyboard, tapping anywhere outside will reopen the keyboard.

What is the root cause of that problem?

The problem is that the main composer receives focus when the edit composer is blurred on web, causing the keyboard to reopen. The order of operations is as follows:

The edit composer hides the main composer when it receives focus:

toggleReportActionComposeView(false, this.props.isSmallScreenWidth);

When the edit composer is subsequently blurred, such as pressing another item like in this issue, it then toggles the main composer back into view:

openReportActionComposeViewWhenClosingMessageEdit(this.props.isSmallScreenWidth);

The main composer is then conditionally rendered:

{(!hideComposer && this.props.shouldShowComposeInput) && (

However the problem is that the main composer has autofocus, so when it's re-rendered due to being toggled via the edit composer, it becomes focused and re-opens the keyboard on web.

What changes do you think we should make in order to solve the problem?

The behavior of autofocus seems to be inconsistent between web and native. The purpose of autofocus on the main composer component would be to provide focus on initial render. However, on web this also has the side effect of re-focusing it when it is re-rendered. The seems to be a disparity in the functionality of autofocus.

I propose that we decide on the definitive behavior and apply it to both platforms. As a result of this issue, I suggest we go with not focusing the main composer when the edit composer is blurred. It should be re-displayed, but not re-focused.

To achieve this we have a couple options:

  1. We could implement the componentDidUpdate lifecycle method of the ReportFooter class to determine if the visibility changed on the current render, and pass autofocus=false down to Composer through props. Visibility toggle happens through Onyx and the shouldShowComposeInput key is passed to ReportFooter. This is probably the more robust solution and likely the one I would recommend moving forward with.

  2. Another possible solution would be to hide the main composer using another method such as display: 'none' on the outer view when hideComposer || !this.props.shouldShowComposeInput evaluates to true. That way the composer would receive focus properly when initially mounted. Changing the display style prop on web doesn't seem to invoke a re-render and therefore may be more performant.

What alternative solutions did you explore? (Optional)

@parasharrajat
Copy link
Member

This does not seem like a bug but the expected behavior.

@redstar504
Copy link
Contributor

@parasharrajat The problem seems to be that the behavior is inconsistent. On web it focuses the composer after editing a message and on native it doesn't. We should probably pick one behavior and apply it to both platforms.

@parasharrajat
Copy link
Member

IMO, This change was made recently and I don't think we have to change it. Let's get more context for this before we move forward. And, I think there are similar issues present on GH either opened or closed state. We should check those before reviewing this one.

@fedirjh
Copy link
Contributor

fedirjh commented Apr 6, 2023

@parasharrajat Thank you for your feedback . I will review this issue shortly.

@chiragsalian
Copy link
Contributor

yeah monthly is fine for this since its on hold

@alexpensify alexpensify removed their assignment Oct 10, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 10, 2023
@Christinadobrzyn
Copy link
Contributor

Still on hold for #15992

@melvin-bot melvin-bot bot removed the Overdue label Nov 14, 2023
@melvin-bot melvin-bot bot added the Overdue label Dec 15, 2023
@Christinadobrzyn
Copy link
Contributor

Still on hold for #15992

@melvin-bot melvin-bot bot removed the Overdue label Dec 16, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 16, 2024
@fedirjh
Copy link
Contributor

fedirjh commented Jan 22, 2024

Still on hold for #15992.

@melvin-bot melvin-bot bot removed the Overdue label Jan 22, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 22, 2024
@Christinadobrzyn
Copy link
Contributor

this is closed - #15992 - so I'll test this tomorrow and see if we need proposals.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Apr 2, 2024

I think this is resolved - going to ask QA to test again - https://expensify.slack.com/archives/C9YU7BX5M/p1712049800250629

@melvin-bot melvin-bot bot removed the Overdue label Apr 2, 2024
@Christinadobrzyn Christinadobrzyn added Daily KSv2 and removed Monthly KSv2 labels Apr 2, 2024
@kavimuru
Copy link

kavimuru commented Apr 2, 2024

@Christinadobrzyn Bug is fixed.

Screenrecorder-2024-04-02-14-17-37-631.mp4

@Christinadobrzyn
Copy link
Contributor

Yay! Thank you @kavimuru! Closing

Copy link

melvin-bot bot commented Apr 3, 2024

@chiragsalian @Christinadobrzyn Be sure to fill out the Contact List!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: CRITICAL
Development

No branches or pull requests

10 participants