RocketChat / RocketChat/Rocket.Chat

[BUG] cannot add multiple lines in attached file description

Open
#24,776 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:
Steps to reproduce:
  1. Send a file using the '+' button on the right side of the Message input field or paste an (image) from the clipboard.
  2. Go to File Description text field and edit it.
  3. Enter random text and press Shift+Enter.
Expected behavior:

The file description text field should accept multiple lines as input.

Actual behavior:

As soon as you press Shift+Enter, the attached file is sent.

PASTING AN IMAGE FROM CLIPBOARD

https://user-images.githubusercontent.com/67605729/157442502-7289dc0d-18d1-48de-a11c-4a20b726b44d.mp4

ATTACHING A FILE BY BROWSING FROM COMPUTER

https://user-images.githubusercontent.com/67605729/157443240-916cf1f0-d078-471c-b0ae-1f263d2bb8a1.mp4

Server Setup Information:
  • Version of Rocket.Chat Server: 4.5.0-develop
  • Operating System: Ubuntu 20.04 running on Windows Subsystem for Linux (WSL2)
  • Number of Running Instances: 1
  • NodeJS Version: 14.18.2 - x64
  • MongoDB Version: 4.4.4
Client Setup Information
  • Desktop App or Browser Version: Google Chrome Version 98.0.4758.102 (Official Build) (64-bit)
  • Operating System: Windows 11
Additional context

If you write a message having multiple lines and then paste an image from the clipboard into the text field, the message is converted into the File description of the image but the line breaks are destroyed making it a single line description.

image
image
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the file description field using the attached-file flow and the clipboard-image flow described above. Inspect the attachment composer and its text input behavior; done means Shift+Enter inserts a line break, and pasted multiline descriptions retain their line breaks instead of sending the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.