tweb
tweb copied to clipboard
[BUG] Consecutive newlines are lost when composing
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:
- Open a chat
- Write message
a\n\nb
(where\n
indicates a newline as entered by Shift-Return) - Press Return to send the message.
- 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:
Actually sent message:
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.