App: [Visual] Unexpected behaviour while editing messages with URLs in them

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


Action Performed:

  1. Login to New Expensify
  2. Edit a message with an url in it
  3. Make no change and save
  4. edited will be shown for a split second

Expected Result:

Nothing should’ve happened

Actual Result:

https://user-images.githubusercontent.com/28243942/127185545-dc1b738c-5ae8-4fd6-8e56-e681b1405217.mp4

Workaround:

None

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL:

View all open jobs on Upwork

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 29 (21 by maintainers)

Most upvoted comments

Paid with bonus for reporting. Apologies for the delay @aman-atg

I don’t think there are regressions on this one, and now that the n6-hold has been lifted we should pay @aman-atg ASAP. @mallenexpensify is out of office today but I’ll be sure to give him a bump tomorrow on this. Thanks so much for your patience @aman-atg. It’s highly unusual that a contributor would wait this long for payment.

I’m not entirely sure about this but I think the issue doesn’t get closed till the PR is deployed.

@Luke9389 can you work with @jasperhuangg if/when needed on this?

Can do! Welcome to the team Jasper!

Hired @aman-atg in Upwork. @Luke9389 can you work with @jasperhuangg if/when needed on this? He’s newer to E/App issues. Thanks

Job posted to Upwork, @aman-atg , let me know when you’ve submitted a proposal there. https://www.upwork.com/jobs/~01c72e946f00a7e2ff

Hey @aman-atg! Looks like a job was created for ya by @mallenexpensify. Feel free to request me for a review when you finish the PR!

Proposal

Explaination

  • Here, we’re getting htmlForNewComment and while parsing we’re adding only target="_blank" attribute to our anchor elements <a> which makes it not equal to originalReportAction.message[0].html as the latter has rel="noreferrer noopener" as well as an attribute for anchor elements

https://github.com/Expensify/App/blob/30242db8c7703f8e430c641903baa5a1a2855151/src/libs/actions/Report.js#L1267

Solution

Hey @aman-atg! I think this solution sounds great! Let me reach out to someone to get you moving with this, sorry for the delay.

Reproducable. Getting eng eyes on this to confirm we want to change/this will work and then we can go external