RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.85k stars 10.77k forks source link

Copy history message with multi line and pasty to new message will auto add blank line. #27396

Open akong77 opened 2 years ago

akong77 commented 2 years ago

Description:

I have upgrade to 5.3.2.I found a bug.If I copy history message and it's message have multi line.Then I pasty to my message.It's will auto add blank line.How to fix it.

Steps to reproduce:

  1. Copy multi line history message
  2. Pasty to my message.
  3. It's will auto add blank line.

Expected behavior:

The original message should be displayed

Actual behavior:

圖片 The original is 圖片

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

dudanogueira commented 2 years ago

Hi! That's a nice catch, but not sure if a bug exactly :)

Just to clarify: When you copy a multi line text from Rocket.Chat and paste it (tested on VSCODE), it will indeed add a blank line between lines.

Example: 123 456 789 111 222 333

When I pasted in LibreOffice, however, it didn't added the space.

This is because Rocket.Chat will render the message like this:

<p>123</p>
<p>456</p>
<p>789</p>
<p>111</p>
<p>222</p>
<p>333</p>

and not like this


123<br />
456<br />
789<br />
111<br />
222<br />
333<br />

While both can represent the same, it will depend on how the receiving party will render that while receiving the information.
akong77 commented 2 years ago

Okay,Maybe it's not a bug.Could fix it?

BhuvanAde commented 1 year ago

@dudanogueira As a UI/UX designer, I believe I can solve this issue. Shall I proceed?

jsrjhbaryan959 commented 1 year ago

I would like to work on this, please assign this to me.

himani-mehra commented 3 months ago

Hi @akong77 , I would love to take on this issue and contribute to the project. Could you please assign it to me if it's available? Looking forward to your response. Thanks!

akong77 commented 3 months ago

@himani-mehra This problem should fix it.Thanks a lot.