Closed Bug 1676160 Opened 4 years ago Closed 3 years ago

Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from Gnome on Wayland clipboard

Categories

(MailNews Core :: Composition, defect)

Unspecified
Linux
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: markus.goppelt, Unassigned)

Details

Attachments

(5 files)

Attached file original text

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

I composed a new e-mail in plain text mode.

Actual results:

Thunderbird adds additional newlines and spaces to the original text.

thunderbird_test.txt
the original text which I pasted into the "Write" dialog

thunderbird_test_Write.txt
I get this from the dialog when I perform "Select All" and "Copy"

thunderbird_test_Sent.txt
I get this in my "Sent" folder ("Select All" and "Copy")

thunderbird_test_Inbox.txt
I get this in my "Inbox" ("Select All" and "Copy")

Expected results:

The original text should not have been modified.

Attached file from the dialog
Attached file Sent
Attached file Inbox
Attachment #9186654 - Attachment description: thunderbird_test.txt → original text

Reproduces after help > Restart with addons disabled?

Flags: needinfo?(markus.goppelt)

I don't have any addons. I did the restart and ran Thunderbird in safe-mode. The problem stays the same.

Flags: needinfo?(markus.goppelt)

(In reply to Markus Goppelt from comment #5)

I don't have any addons. I did the restart and ran Thunderbird in safe-mode. The problem stays the same.

Can you select More > View Source, then copy and paste the section from your message in your Sent folder, like this example from my Sent folder?

Subject: Compose tests
Message-ID: <0756cf1b-a827-73cc-914b-09af6e093805@comcast.net>
Date: Sun, 15 Nov 2020 13:26:19 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.4.3
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit

This is a test.

This is a test.

This is a test.

Hello!

I can't reproduce the issue using 78.4.3 on Windows 10.

Flags: needinfo?(markus.goppelt)

I did "View > Message Source" from the menu bar. Looks like each newline character gets an additional newline character.

From - Sun Nov 15 17:35:15 2020
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00800000
X-Mozilla-Keys:
To: goppeltmarkus@gmail.com
From: Markus Goppelt <markus.goppelt@gmx.net>
Subject: Test
Message-ID: <d3d2884e-fe2a-860f-f582-b45d6e5cd700@gmx.net>
Date: Sun, 15 Nov 2020 17:35:14 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.4.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit

Hello Test,

this is a test.

Regards,

Test

--

Test

Flags: needinfo?(markus.goppelt)
Attached file Sent source

That's weird. I pasted the source into "Add Comment". "Save Changes" cleared the newlines. Please see the "Sent source" attachment.

Well, you're not accidentally composing in HTML.

I don't know why you are seeing that.

When I compose in plaintext I don't have a space between lines unless I press “Enter” twice. Which is what I did for the test in comment 6.

This is from my Sent folder and a copy and paste for the reply.

This is a test.
This is a test line 2.
Same here.
Walt

On 11/16/20 8:48 PM, Walter L Schwartz wrote:

This is a test.
This is a test line 2.
Same here.
Walt

I think I found the problem. When I enter text directly (via keyboard) there is no problem. If I paste text from somewhere else the problem arises. It looks normal in the composition window, but gets sent incorrectly. Even copying and pasting text from Thunderbird itself creates the problem. Thunderbird doesn't seem to be compatible with the Gnome "clipboard". If I recall correctly the first broken version was "78.3.2".

Component: Message Compose Window → Composition
Product: Thunderbird → MailNews Core
Summary: Thunderbird 78.4.0 messes up composing e-mails in plain text → Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from clipboard
OS: Unspecified → Linux
Summary: Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from clipboard → Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from Gnome clipboard

This only affects plain text email on Wayland. GNOME or anything else on X seems ok.

Reproduction steps do not require you to send any email.

  1. Type a message with a few newlines, eg

test
test
test

test after line
end

  1. select and paste into non-HTLM email body
  2. Ctrl-A + Ctrl-C + Ctrl-V
  3. see 3

For me, the last working version was:
MozillaThunderbird-78.5.0-3.107.1.x86_64

The first broken version was,
MozillaThunderbird-78.6.0-8.3.1.x86_64.rpm

So it may need some additional bisecting but the definitive component here is Wayland. On X, there are no issues.

Additionally to Comment #12, the extra "hidden" new lines are inserted on paste but show up in the keyboard on a copy. So every time you do a cut to the keyboard you see the additional new lines but they are actually inserted on a paste.

Ctrl-A
Ctrl-X
Ctrl-V

is nice way to see it.

My Fedora 33 Workstation Gnome is "Window Protocol x11" for my Thunderbird 78.8.1 installed from Thunderbird.

Summary: Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from Gnome clipboard → Thunderbird 78.4.0 messes up composing e-mails in plain text when pasted from Gnome on Wayland clipboard

I have the same problem on openSUSE Tumbleweed with Wayland, Gnome 40.1 and TB 78.10.0.

May I please ping the issue. It's pretty annoying and apparently happens both on Fedora and openSUSE, both are using Wayland.
Can please anybody take a look?

(In reply to Martin Liška from comment #16)

May I please ping the issue. It's pretty annoying and apparently happens both on Fedora and openSUSE, both are using Wayland.
Can please anybody take a look?

Hmm, I can confirm that officially built 78.10.2 works fine. While openSUSE Tumbleweed is broken (equal version).

Reporter, how is version 91?

Flags: needinfo?(markus.goppelt)

Version 91.3.2 works fine.

Flags: needinfo?(markus.goppelt)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: