App: [Awaiting payment] [$250] Web - Chat - Error in JS console when right-clicking in the app

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Found when validating PR : https://github.com/Expensify/App/pull/37316

Version Number: v1.4.48-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): almexp2+777@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team

Action Performed:

  1. Go to any chat with some attachments
  2. Open JS console and refresh the page
  3. Right click on any attachment
  4. Refresh the page to clear your console
  5. Right-click on a chat message
  6. Observe the console error
  7. Refresh again
  8. Right-click on a chat row in the LHN
  9. Observe the console error

Expected Result:

No errors appear in the JS console.

Actual Result:

Error in JS console when right-clicking. Error: 'Cannot record touch end without a touch start. Source.

Workaround:

N/A, right-clicking still works functionally.

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

https://github.com/Expensify/App/assets/115492554/2df5ee67-9d2a-46fd-9d53-eda93192982f

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0122ffd00715c18b6e
  • Upwork Job ID: 1765696373749649408
  • Last Price Increase: 2024-03-07
  • Automatic offers:
    • dukenv0307 | Contributor | 0

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

I think renaming it to isPrimaryOrSecondaryPointerDown is fine. I’ve assigned @dukenv0307.

Sorry my bad I was checking the Errors only and not warnings.

additionally check isPrimaryPointerDown(domEvent) only when updating the trackedTouchCount here so it shouldn’t affect the recordTouchTrack operation

I am inclined to have this solution, but I can see isPrimaryPointerDown is used only at one place so we might just update the method to isPrimaryOrSecondaryPointerDown.

Going to take a feedback from internal engineer. But @dukenv0307’s proposal/alternative works for me.

🎀 👀 🎀 C+ reviewed