tweb icon indicating copy to clipboard operation
tweb copied to clipboard

[BUG] Consecutive newlines are lost when composing

Open pcworld opened this issue 3 years ago • 0 comments

Describe the bug When sending a message, entering multiple consecutive newlines (via Shift-Return) get lost after sending (are replaced by a single newline).

To Reproduce Steps to reproduce the behavior:

  1. Open a chat
  2. Write message a\n\nb (where \n indicates a newline as entered by Shift-Return)
  3. Press Return to send the message.
  4. The message sent is a\nb, the empty line is lost.

Expected behavior The message sent should be a\n\nb (where \n indicates a newline).

Screenshots Composing: image Actually sent message: image

Desktop

  • OS: Ubuntu 20.04
  • Browser: Firefox 97.0

Additional context After reproduction step 2, copying the message and then pasting it again also loses the empty line (Ctrl-A Ctrl-C Ctrl-V). When pasting the contents into an external application, the empty line is not lost. Further, when composing a\n\nb in an external application, copying it and then pasting it into the Telegram client, the empty line is also not lost.

pcworld avatar Feb 18 '22 14:02 pcworld