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 #23546][$500] mWeb - PDF - When typing password, revealing it and confirm, another attachment is displayed #35197

Closed
1 of 6 tasks
kbecciv opened this issue Jan 25, 2024 · 42 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 Jan 25, 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.32-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4238270
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Pre-requisite: the user must be logged in.

  1. Go to any chat.
  2. Send a password protected PDF.
  3. Send another attachment.
  4. Tap on the password protected PDF preview.
  5. Type the password.
  6. Tap on the eye icon button to reveal it (Important step).
  7. Tap on "Confirm".

Expected Result:

The password protected PDF should be displayed.

Actual Result:

Another file is displayed.

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

Bug6355154_1706218295008.Xfnu9744_1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014ec322edab15924f
  • Upwork Job ID: 1750639602223542272
  • Last Price Increase: 2024-02-08
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~014ec322edab15924f

@melvin-bot melvin-bot bot changed the title mWeb - PDF - When typing password, revealing it and confirm, another attachment is displayed [$500] mWeb - PDF - When typing password, revealing it and confirm, another attachment is displayed Jan 25, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

Copy link

melvin-bot bot commented Jan 25, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Jan 25, 2024

We think that this bug might be related to #vip-vsb
CC @quinthar

@jeremy-croff
Copy link
Contributor

Seems like a side effect of #23546
I noticed it diddn't even open the correct image on initial load.

@ikevin127
Copy link
Contributor

ikevin127 commented Jan 26, 2024

Proposal

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

Another file is displayed after inputting the password for a password protected pdf file, tapping the reveal password "Eye" then pressing the Confirm.

What is the root cause of that problem?

I found the culprit, the line which for some weird unknown reason causes this issue, only after tapping the reveal password "Eye" then pressing the Confirm button. It was introduced by this PR #26025 and this is the line:

// Keep focus on the TextInput effectively keeping keyboard open
onMouseDown={(e) => e.preventDefault()}

I know this is not enough to pass as an acceptable RCA since the reason why it's only happening when the reveal password "Eye" is tapped, is still unknown. But since I found a solution to the issue I thought I should mention it 🌞

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

Removing the line mentioned above fixes the issue but that wound also mean removing the functionality added by the mentioned PR which is: keyboard should stay open (keeping input focused) when clicking the Confirm button.

If we really want this fixed even though the full root cause is unknown, and we're fine with not having the "keyboard should stay open" functionality on iOS: mWeb Safari - we can create a library that will target only iOS: mWeb Safari, keeping the PR's functionality for all other platforms while fixing the current issue in Safari.

Videos

iOS: mWeb Safari
Before After
Screen.Recording.2024-01-26.at.16.34.53.mov
Screen.Recording.2024-01-26.at.16.36.06.mov
MacOS: Safari
Before After
Screen.Recording.2024-02-05.at.17.23.07.mov
Screen.Recording.2024-02-05.at.17.24.38.mov

@c3024
Copy link
Contributor

c3024 commented Jan 29, 2024

Thanks for digging.

That did work. Let's see if we can identify the root cause.

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2024
@jeremy-croff
Copy link
Contributor

I also had identified the mouseEvent tergerring the wrong image. And after this not making sense identified that initially the correct image did not even op in the video. The mouse event I believe is just a side effect of the original safari bug and the FlatList component

@ikevin127
Copy link
Contributor

ikevin127 commented Jan 29, 2024

Indeed, @kidroca already identified a similar issue and raised it here: necolas/react-native-web#2544, more details: #23546 (comment)

From the react-native-web issue:

When opening a Modal that includes a ScrollView or a VirtualList spanning multiple pages, the ScrollView automatically scrolls to the first element. This issue arises from the modal focus trap logic, even when the initialScrollIndex is set to a value other than the index of the first element.

For sure part of the root cause here is related to the FlatList edge case experienced on Safari - the modal's focus trap logic.

We just don't know exactly why does the reveal password together with the preventDefault on the onMouseDown of thr Confirm button produces the current issue.

I'll try doing some more digging in hopes of finding the root cause of the current issue and possibly get back with a better solution 🚀

@melvin-bot melvin-bot bot added the Overdue label Jan 31, 2024
@CortneyOfstad
Copy link
Contributor

@c3024 thoughts on the proposals above? Thanks!

Copy link

melvin-bot bot commented Feb 1, 2024

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

@CortneyOfstad
Copy link
Contributor

@c3024 bump on the proposals above? Thanks!

@c3024
Copy link
Contributor

c3024 commented Feb 2, 2024

Thanks for the bump. I'll update in a few hours.

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
@c3024
Copy link
Contributor

c3024 commented Feb 5, 2024

Asked here on Slack

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
@c3024
Copy link
Contributor

c3024 commented Feb 5, 2024

@c3024 I wanted to mention the proposal also corrects the image not getting loaded correctly when more than one image is loaded, in desktop safari incorrect image is loaded.

I think you mean this solution fixes another bug as well. Could you explain this preferably with a video? Thanks. @Sourcecodedeveloper

@melvin-bot melvin-bot bot added the Overdue label Feb 22, 2024
@CortneyOfstad
Copy link
Contributor

In the linked GH, there is discussion around next steps, so going to keep this at weekly until the PR is resolved.

@melvin-bot melvin-bot bot removed the Overdue label Feb 22, 2024
@CortneyOfstad
Copy link
Contributor

Bumped the other GH — will continue to keep an eye on things 👍

@melvin-bot melvin-bot bot added the Overdue label Mar 7, 2024
@CortneyOfstad
Copy link
Contributor

Back from Ooo! Bumped the other GH and requested an update by EOD today. Will follow up here when received 👍

@melvin-bot melvin-bot bot removed the Overdue label Mar 11, 2024
@CortneyOfstad
Copy link
Contributor

Realized I forgot to add the wave/VIP — adjusted this to match the on-hold issue 👍

Bumped the GH again here — Rajat is working to try and recreate under the latest issue, while Peter is continuing to work on a solution that will resolve multiple reported issues under this umbrella of images and attachments displaying incorrectly 👍

@melvin-bot melvin-bot bot added the Overdue label Mar 25, 2024
@CortneyOfstad
Copy link
Contributor

Peter has found that the issue is affecting web browsers, so fix will be focused there 👍

@melvin-bot melvin-bot bot removed the Overdue label Mar 25, 2024
@CortneyOfstad
Copy link
Contributor

Bumped on the on-hold GH here — will update as soon as I hear back 👍

@CortneyOfstad
Copy link
Contributor

Draft PR created here!

@CortneyOfstad
Copy link
Contributor

Reached out for additional guidance/next steps here

@CortneyOfstad
Copy link
Contributor

PR is in review now — #39930

@CortneyOfstad
Copy link
Contributor

PR is still in review 👍

@CortneyOfstad
Copy link
Contributor

Bumped a comment on the PR here

@CortneyOfstad
Copy link
Contributor

PR is continuing to be reviewed with comments as recent as <2 hours ago 👍

@CortneyOfstad
Copy link
Contributor

PR has been reviewed and should be marked for merging based on the comment here

@CortneyOfstad
Copy link
Contributor

We're on a merge freeze until Wednesday, so this will be delayed 👍

@CortneyOfstad
Copy link
Contributor

Merge freeze should end today 🤞

@melvin-bot melvin-bot bot added the Overdue label May 30, 2024
@CortneyOfstad
Copy link
Contributor

Went into product:ion 4 days ago! 😍

@melvin-bot melvin-bot bot removed the Overdue label Jun 3, 2024
@CortneyOfstad CortneyOfstad added Daily KSv2 and removed Weekly KSv2 labels Jun 3, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2024
@CortneyOfstad
Copy link
Contributor

On hold issue has been resolved/completed, so this can be closed! 🎉

@melvin-bot melvin-bot bot removed the Overdue label Jun 6, 2024
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
Development

No branches or pull requests

5 participants