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 for payment 2024-10-24] [$250] mWeb/Safari - Chat - Keyboard does not close when action menu opens #44042

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 19, 2024 · 99 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

@lanitochka17
Copy link

lanitochka17 commented Jun 19, 2024

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.4.85-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): gibethlehem+3gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to any chat
  2. Click on the composer to bring the keyboard (if its not already open)
  3. While the keyboard is open long press on a message to bring the action menu

Expected Result:

The keyboard closes when the action menu is opened

Actual Result:

The keyboard stays open when the action menu is opened

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

Add any screenshot/video evidence

Bug6518642_1718815096023.Keyboard_Actionmenu.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0174c82b024da104ac
  • Upwork Job ID: 1805674432646033914
  • Last Price Increase: 2024-08-13
  • Automatic offers:
    • rojiphil | Reviewer | 103557667
    • dominictb | Contributor | 103557669
Issue OwnerCurrent Issue Owner: @CortneyOfstad
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 19, 2024
Copy link

melvin-bot bot commented Jun 19, 2024

Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

@CortneyOfstad Eep! 4 days overdue now. Issues have feelings too...

@CortneyOfstad
Copy link
Contributor

Sorry, was OoO!

Was able to recreate, so going to get eyes on this!

IMG_1119

@melvin-bot melvin-bot bot removed the Overdue label Jun 25, 2024
@CortneyOfstad CortneyOfstad added the External Added to denote the issue can be worked on by a contributor label Jun 25, 2024
@melvin-bot melvin-bot bot changed the title mWeb/Safari - Chat - Keyboard does not close when action menu opens [$250] mWeb/Safari - Chat - Keyboard does not close when action menu opens Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0174c82b024da104ac

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

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

@dominictb
Copy link
Contributor

dominictb commented Jun 26, 2024

Proposal

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

There're 2 problems:

  1. Keyboard does not close when users open popover from three dot
Screen.Recording.2024-06-26.at.17.39.26.mov
  1. Keyboard does not close when users open action menu (the original issue)

What is the root cause of that problem?

  1. We're getting the active input by this function

function getActiveInput() {
return (TextInput.State.currentlyFocusedInput ? TextInput.State.currentlyFocusedInput() : TextInput.State.currentlyFocusedField()) as InputElement;
}

but in web platform, we use the div with contentEditable to present the input

-> we can't get the active input -> the logic to blur input here is not triggered

  1. To trigger blur input, we need to enable shouldEnableNewFocusManagement in

if (shouldEnableNewFocusManagement) {
ComposerFocusManager.saveFocusState(uniqueModalId);
}

but we did not enable it in PopoverWithMeasuredContent

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

  1. getActiveInput is implemented for both native and web platform, but it's not the same as this comment so we can separate this function in 2 file index.ts and index.native.ts

For native platform, we can keep using currentlyFocusedInput
For web/desktop platform, we can use document.activeElement

    const activeElement = document.activeElement
    if(activeElement?.getAttribute('contentEditable') || activeElement?.tagName === 'INPUT'){
        return activeElement
    }
  1. Enable shouldEnableNewFocusManagement in PopoverWithMeasuredContent

What alternative solutions did you explore? (Optional)

Use ReportActionComposeFocusManager.composerRef.blur() in

setIsContextMenuActive(true);

Result

Screen.Recording.2024-06-26.at.17.59.07.mov

@muttmuure
Copy link
Contributor

This is not a #newdot-quality bug - the feature is not unreliable, slow or performing redundant or unexpected API calls, it just doesn't work as designed

@CortneyOfstad
Copy link
Contributor

Thanks for the clarification @muttmuure!

@CortneyOfstad
Copy link
Contributor

CortneyOfstad commented Jul 1, 2024

@rojiphil there is a proposal here for review 👍

Copy link

melvin-bot bot commented Jul 1, 2024

@rojiphil, @CortneyOfstad Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Jul 2, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue labels Aug 20, 2024
@CortneyOfstad
Copy link
Contributor

CortneyOfstad commented Sep 11, 2024

@dominictb any update on the PR based on the last comment here?

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

This issue has not been updated in over 15 days. @cead22, @rojiphil, @CortneyOfstad, @dominictb eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@dominictb
Copy link
Contributor

@CortneyOfstad I have resolved the conflicts. Waiting for @rojiphil final review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Oct 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] mWeb/Safari - Chat - Keyboard does not close when action menu opens [HOLD for payment 2024-10-24] [$250] mWeb/Safari - Chat - Keyboard does not close when action menu opens Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.49-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-10-24. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 17, 2024

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:

  • [@rojiphil / @dominictb] The PR that introduced the bug has been identified. Link to the PR:
  • [@rojiphil / @dominictb] 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:
  • [@rojiphil / @dominictb] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@rojiphil / @dominictb] Determine if we should create a regression test for this bug.
  • [@rojiphil / @dominictb] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@CortneyOfstad] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@rojiphil
Copy link
Contributor

  • [@rojiphil] The PR that introduced the bug has been identified. Link to the PR: Offending PR
  • [@rojiphil] 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: Added comment
  • [@rojiphil] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not Required. Existing checklist is good enough to capture such issues.
  • [@rojiphil] Determine if we should create a regression test for this bug. : Yes. We can
  • [@rojiphil] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Steps:
Note: Tests are applicable only for native and mweb platforms.

  1. Go to any chat
  2. Click on the composer to bring the keyboard (if its not already open)
  3. While the keyboard is open long press on a message to bring the action menu
  4. Verify that the keyboard closes when the action menu is opened (Test 1)
  5. Click and focus inside an editable message so that the keyboard is displayed.
  6. While the keyboard is open long press on any other message to bring the action menu.
  7. Verify that the keyboard closes when the action menu is opened (Test 2)

@rojiphil
Copy link
Contributor

@CortneyOfstad BZ Checklist is done.

@melvin-bot melvin-bot bot added the Overdue label Oct 25, 2024
@cead22
Copy link
Contributor

cead22 commented Oct 28, 2024

Waiting for payment - not overdue

@melvin-bot melvin-bot bot removed the Overdue label Oct 28, 2024
@CortneyOfstad
Copy link
Contributor

Sorry for the delay here!

@rojiphil – it looks like your offer expired back in September, so I issued you a new one here. Please let me know once you accept and I can get that paid ASAP. Thank you so much!

@rojiphil
Copy link
Contributor

It looks like your offer expired back in September, so I issued you a new one here.

@CortneyOfstad Accepted offer. Thanks.

@CortneyOfstad
Copy link
Contributor

Payment Summary

@dominictb — paid $250 via Upwork
@rojiphil — paid $250 via Upwork

Regression Test

https://github.com/Expensify/Expensify/issues/439515

Copy link

melvin-bot bot commented Oct 28, 2024

@cead22 @CortneyOfstad 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
Awaiting Payment Auto-added when associated PR is deployed to production 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
None yet
Development

No branches or pull requests

8 participants