Closed Bug 1839226 Opened 1 year ago Closed 1 year ago

Replying with part of original message selected doesn't work correctly for plaintext messages which aren't format=flowed

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 115
Unspecified
All
defect

Tracking

(thunderbird_esr115 fixed, thunderbird119 fixed)

VERIFIED FIXED
120 Branch
Tracking Status
thunderbird_esr115 --- fixed
thunderbird119 --- fixed

People

(Reporter: better.bird.project+2, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression, testcase, Whiteboard: [Supernova3p])

Attachments

(3 files)

+++ This bug was initially created as a clone of Bug #1818683 +++

Reply to the attached message with and without selection. This is a non-flowed message.

Attached file test-plain.eml
Keywords: regression
Regressed by: 1818683
Whiteboard: [Supernova3p]

I can confirm with attached testcase on TB 115.0b3 (64-bit):

If you reply without selecting part of the text everything is ok. If 2 lines are selected (e.g.: line 1 and line 2) the original formatting is lost and the 2 lines are put on a single new line: instead of as

line 1
line 2

is reported

line 1 line 2

Blocks: tb-new-3pane
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
See Also: → 1839816

This seems to affect the extensions API as well. With add-on "Display Mail User Agent T" installed, replies to non f=f message are also incorrect. Our patch doesn't fix that (yet).

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 267832
Resolution: --- → DUPLICATE

Turns out bug 267832 is a bit different. Especially wrt forwarding.

Assignee: nobody → mkmelin+mozilla
Status: RESOLVED → REOPENED
No longer duplicate of bug: 267832
Resolution: DUPLICATE → ---
Target Milestone: --- → 120 Branch

The patch doesn't work in the following case:
Have a HTML message with a plain text attachment and display this attachment inline, this needs setting pref mail.inline_attachments.text.
The result is that the selected HTML text is inserted into a <pre> since your query selector will find the div.moz-text-plain in the attachment display, but it's not the first <div> in the body which is the relevant <div>.
Please study
https://github.com/Betterbird/thunderbird-patches/blob/00d088d4351c39cf9e792341cfcf3542a3f37770/115/bugs/1839226-fix-quoting-selection-non-flowed.patch#L106

Can you fix this before it lands? We'd appreciate if you could attribute the basic idea to the fix accordingly. Yes, you shifted the implementation from JS to C++, but the concept is the same.

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(mkmelin+mozilla)

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/db55005600e1
Fix for replying to selection of original plaintext messages which isn't format=flowed. r=babolivier

Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED

Comment on attachment 9357613 [details]
Bug 1839226 - Fix for replying to selection of original plaintext messages which isn't format=flowed. r=babolivier

[Triage Comment]
Approved for beta

Attachment #9357613 - Flags: approval-comm-beta+

v.fixed on nightly

Status: RESOLVED → VERIFIED
Attachment #9357613 - Flags: approval-comm-esr115?

Comment on attachment 9357613 [details]
Bug 1839226 - Fix for replying to selection of original plaintext messages which isn't format=flowed. r=babolivier

[Triage Comment]
Approved for esr115

Attachment #9357613 - Flags: approval-comm-esr115? → approval-comm-esr115+

The test isn't working on 115. I don't see a direct reason for it and it's working just fine on trunk. Probably due to improvements in test infra elsewhere.
Tested manually and the feature itself seems to work just fine on 115, so I'm inclined to just disable the test for esr.

Flags: needinfo?(rob)
Duplicate of this bug: 1860431

Comment on attachment 9359752 [details] [diff] [review]
Bug_1839226___disable_browser_replySelection_js.diff

[Triage Comment]
Approved.

Flags: needinfo?(rob)
Attachment #9359752 - Flags: review+
Attachment #9359752 - Flags: approval-comm-esr115+
Regressions: 1891203
No longer regressions: 1891203
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: