Skip to content

Web - Chat - Pasting text using the function "Paste as plain text" adds extra blank lines #13507

Closed

Description

@kbecciv

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


Issue found when executing PR #13396

Action Performed:

  1. Go to URL https://staging.new.expensify.com/
  2. Login with any account
  3. Open any chat
  4. Copy multiple lines of code from GitHub repo source code page, the text you copied must contain at least one line which has whitespace in the beginning of the line, and must contain < or > too
  5. Paste the text you copied to the textbox and send it
  6. Long press the message you just sent, open the context menu
  7. Press Copy to clipboard on the context menu
  8. Long press textbox and paste to textbox using the system paste menu as "Paste as plain text"

Additional Information:

Text to be pasted:

Label issues and pull requests for new contributors

Now, GitHub will help potential first-time contributors The pasting text adds extra blank lines

Expected results:

The copied and pasted text is the same

Actual results:

The pasting text adds extra blank lines

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web

Version Number: 1.2.38.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug5858000_13396_Web.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 10, 2022
  2. melvin-bot commented on Dec 10, 2022

    @melvin-bot

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

  3. removed their assignment
    on Dec 12, 2022
  4. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 12, 2022
  5. melvin-bot commented on Dec 12, 2022

    @melvin-bot

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

  6. MitchExpensify commented on Dec 12, 2022

    @MitchExpensify
    Contributor

    I am going ooo and need to reassign this one!

  7. self-assigned this
    on Dec 12, 2022
  8. trjExpensify commented on Dec 12, 2022

    @trjExpensify
    Contributor

    Reproduction notes

    MacOS Chrome - Staging v1.2.38-2

    I'm struggling to reproduce this one, so I think the steps need to be made a bit clearer. A couple of things would be great:

    1 - a link or path to the example code block to use, so it's reliable to reproduce and not open to interpretation to the tester
    2 - the issue is listed as Web only, but notes to "long press to paste" whereas I think we're saying to right click in the composer and select "Paste" not "Paste and match format" (I tried both, and "Paste as plain text" isn't an option I see)

    These were the steps I followed:

    1. Go to URL https://staging.new.expensify.com/
    2. Login with any account
    3. Open any chat
    4. Copy multiple lines of code from GitHub repo source code page, the text you copied must contain at least one line which has whitespace in the beginning of the line, and must contain < or > too (example to use L13-L18: view-source:https://raw.githubusercontent.com/Expensify/App/main/src/pages/ErrorPage/ErrorBodyText/index.js
    5. CMD+V to paste the text you copied to the composer and send it
    6. "Long" right click the message you just sent, open the context menu and click "Copy to Clipboard"
    7. Right click in the composer and paste to textbox using the system paste menu as "Paste" > click send
    8. Repeat steps 4-6 >
    9. Right click in the composer and paste to textbox using the system paste menu as "Paste and match format" > click send

    image

    Potential duplicate issues to note
    #13396 - this PR fixed a very similar sounding issue on mWeb. The tests cover Web and don't look like the OP of this issue. It's not on staging just yet though 🤔

  9. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    Hmm yeah I'm not able to reproduce this either on staging or production.

    I'm using Firefox and the ability to Paste as plaintext isn't even showing up for me and the keyboard shortcut for this cmd+shift+v doesn't do anything either

    I was using code from here (internal only sorry) https://github.com/Expensify/Web-Expensify/blob/c4c00a1eaf65ec2446235ffb4505c10e0cbc3478/_support/addDepositBankAccount.php#L286-L295

    which is PHP code, looks like the video uploaded was from App repo / JS code so going to try some code from there as well.

  10. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    oh wait, this is actually pulling from the view source of an HTML page not any of the raw code views. let me try that

  11. trjExpensify commented on Dec 14, 2022

    @trjExpensify
    Contributor

    Yeah, I was trying with L13-L18 here: view-source:https://raw.githubusercontent.com/Expensify/App/main/src/pages/ErrorPage/ErrorBodyText/index.js

  12. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    the current staging version is v1.2.39-0, this shows v1.2.38 is where it was occurring so I think this has already been fixed b/c I can't reproduce either.

    even production web v1.2.38-6 I can't reproduce with pulling code from view-source:https://github.com/Expensify/App/issues

    2022-12-14_11-57-12.mp4
  13. trjExpensify commented on Dec 14, 2022

    @trjExpensify
    Contributor

    I'm using Firefox

    Out of curiosity, why are you trying Firefox? That's a browser we've deemed unsupported at this time, so probably best to confirm using Chrome as a first step for newdot reproductions.

  14. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    That's a browser we've deemed unsupported at this time

    what why? Firefox is my primary browser and I use 100% of the time.

  15. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    oh... :sad-panda: 3% market share nvm i thought it was higher
    image

    https://www.youtube.com/watch?v=lKie-vgUGdI

  16. bondydaa commented on Dec 14, 2022

    @bondydaa
    Contributor

    anywho yes I think we close this out as it's not reproducible.

  17. trjExpensify commented on Dec 14, 2022

    @trjExpensify
    Contributor

    Yeah, exactly. We have plenty of bugs in Chrome and Safari to fix for now!

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.DailyKSv2Needs ReproductionReproducible steps needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions