Skip to content

[$250] When editing comment, copy and paste text that has trailing \n, console error appears and send button changed to grey, can not send #43239

Closed

Description

@m-natarajan

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: v1.4.80-9
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
Expensify/Expensify Issue URL:
Issue reported by: @badeggg
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1717559130850559

Action Performed:

  1. Open any chat page
  2. in the composer box, copy text that has trailing a trailing line break, \n, paste it to the composer box, ie.
test


Expected Result:

No error logging in console and can send text

Actual Result:

Console error appears and send button changed to grey, can not send

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

cc.mp4

Snip - (9) New Expensify - Google Chrome

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01296f154c567ad13d
  • Upwork Job ID: 1802744039321176346
  • Last Price Increase: 2024-06-17
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 7, 2024
  2. melvin-bot commented on Jun 7, 2024

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Bug assigner, not assigning anyone new.

  3. situchan commented on Jun 7, 2024

    @situchan
    Contributor

    Here's clear repro step:

    1. Copy this code block
    test
    
    
    
    1. Paste into composer
  4. melvin-bot commented on Jun 10, 2024

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  5. mallenexpensify commented on Jun 11, 2024

    @mallenexpensify
    Contributor

    The issue appears to have to do with the trailing space or linebreak at the end, when it's removed, you can post. Does that sound right @badeggg and @situchan

    w_e5779e27696d0562df5cc72192db49420213f1cc.mp4
  6. MelvinBot commented on Jun 11, 2024

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  7. badeggg commented on Jun 11, 2024

    @badeggg
    Contributor

    The issue appears to have to do with the trailing space or linebreak at the end,

    Not exactly, trailing line break can repro, trailing space can not.

    when it's removed, you can post

    Actually, you just need change the comment just a little bit after pasting (e.g. add letter 'a' in what ever place), you can post.

    By the way, is this issue waiting proposals from external?

  8. badeggg commented on Jun 11, 2024

    @badeggg
    Contributor

    If you are using vscode, select two lines(one line is ok too) and cmd + c to copy, like this:
    image
    If you use vim, shift + v enter visual mode, shift + " + * + y to copy, like this:
    image

    Paste to composer box, error appears

  9. situchan commented on Jun 12, 2024

    @situchan
    Contributor

    The issue appears to have to do with the trailing space or linebreak at the end, when it's removed, you can post. Does that sound right @badeggg and @situchan

    w_e5779e27696d0562df5cc72192db49420213f1cc.mp4

    The video you shared correctly explains the bug. Send button is disabled along with console error.

  10. 14 remaining items

  11. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 20, 2024
  12. mallenexpensify commented on Jun 20, 2024

    @mallenexpensify
    Contributor

    Thanks @BartoszGrajdek , I added to the Live Markdown project, removed Help Wanted and bumped to weekly.
    @badeggg , hang tight for now plz while we get a better handle on managing markdown improvements more holistically.

  13. BartoszGrajdek commented on Jun 20, 2024

    @BartoszGrajdek
    Contributor

    Thank you @mallenexpensify 🙌🏻

    I've added a more in-depth update here. I'll be looking through proposals in the coming days. What @badeggg is suggesting to change is something that has already caused quite a few problems, so I'd rather test it carefully.

  14. melvin-bot commented on Jun 21, 2024

    @melvin-bot

    @eVoloshchak @mallenexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  15. BartoszGrajdek commented on Jun 24, 2024

    @BartoszGrajdek
    Contributor

    I believe this was fixed here! Can we get it retested?

    These changes are also coming into react-native-live-markdown later this week.

    cc @mallenexpensify

  16. added
    retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause
    on Jun 25, 2024
  17. mallenexpensify commented on Jun 25, 2024

    @mallenexpensify
    Contributor

    Unable to reproduce on web, staging, Chrome. Closing. Thanks @BartoszGrajdek !

  18. moved this from MEDIUM to Done in Live Markdownon Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions