Closed Bug 1624549 Opened 4 years ago Closed 3 years ago

plainTextBody: editor.outputToString("text/plain", 0), is wrong

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: jorgk-bmo, Assigned: TbSync)

Details

Attachments

(3 files, 1 obsolete file)

https://searchfox.org/comm-central/rev/0c6472bec30280a0648e5101ffacaf72907e4cc2/mail/components/extensions/parent/ext-compose.js#160

This is most likely wrong, as it doesn't cater for CJK text.

You should use nsIDocumentEncoder::OutputDisallowLineBreaking

Sorry, the line above is equally wrong:
body: editor.outputToString("text/html", 0),

Or maybe I'm wrong, maybe it doesn't matter if we don't request formatted. Best to try it with some long CJK text, like here:
https://searchfox.org/comm-central/rev/0c6472bec30280a0648e5101ffacaf72907e4cc2/mailnews/compose/test/unit/test_longLines.js#98

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (Backlog,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (Backlog,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (Backlog,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → S3

The severity of these bugs was changed, mistakenly, from normal to S3.

Because these bugs have a priority of --, indicating that they have not been previously triaged, these bugs should be changed to Severity of --.

Severity: S3 → --
Attached file compose.details.debug.zip (obsolete) —

STR using the attached add-on.

  1. Install this extension using the "Load Temporary Add-on ..." on the "Debug Add-ons" page.
  2. Copy the following content of the attached sample.txt file into a composer (download the file to disk, do not copy its content from the html view of bugzilla).
  3. Change the width of the compose window and observe how the text reflows.
  4. Click on the Compose action button "Test"

-> The content of the composer will be removed and put back in after 1s.

  1. Change the width of the compose window and observe how the text reflows but now has extra spaces in it.
Attached file sample.txt
Attachment #9220840 - Attachment is obsolete: true
Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/d5632ba2d883
Fix getComposeDetails for long CJK text. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: