Closed Bug 1713867 Opened 4 years ago Closed 4 years ago

[perma] comm/mail/components/extensions/test/browser/browser_ext_compose_begin.js | plainText content is correct - Got "\n", expected ""

Categories

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

Thunderbird 91

Tracking

(thunderbird_esr78 unaffected)

RESOLVED FIXED
91 Branch
Tracking Status
thunderbird_esr78 --- unaffected

People

(Reporter: intermittent-bug-filer, Assigned: masayuki)

References

(Regression)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

This is from https://hg.mozilla.org/mozilla-central/rev/9d28dcb2d4d46cc2c400ffdc61d8d4b2cbd4a99b - bug 1540037

Failure here: https://searchfox.org/comm-central/rev/0a44d4b34d6c7269fa1791d52cab21e83e61b115/mail/components/extensions/test/browser/browser_ext_compose_begin.js#595

So editor.outputToString("text/plain", Ci.nsIDocumentEncoder.OutputRaw) of an initial editor (in paragraph mode) is now "\n" instead of empty. Unclear to me if it's expected or not?

Flags: needinfo?(masayuki)
Regressed by: 1540037
Summary: Intermittent comm/mail/components/extensions/test/browser/browser_ext_compose_begin.js | plainText content is correct - Got "\n", expected "" → [perma] comm/mail/components/extensions/test/browser/browser_ext_compose_begin.js | plainText content is correct - Got "\n", expected ""
Version: unspecified → Thunderbird 91

It's obviously a regression of it. I'll take a look.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Flags: needinfo?(masayuki)

It stopped using ComputeValueFromTextNodeAndBRElement for HTMLEditor case.
However, ComputeValueFromTextNodeAndBRElement handles the case that there is
only padding <br> element for empty editor even if the instance is
HTMLEditor.

So, this patch makes it handle this special case by itself before checking
whether the instance is TextEditor.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/00a9c51d2cc3 Make `EditorBase::ComputeValueInternal` handle the case when there is only a padding <br> element for empty editor r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Regressions: 1716299
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: