Closed Bug 1730363 Opened 3 years ago Closed 3 years ago

`Expand List` merges preceding error pill `John` (without @) with first address from mailing list, which becomes invalid

Categories

(Thunderbird :: Message Compose Window, defect, P3)

Tracking

(thunderbird_esr91+ fixed, thunderbird93+ fixed)

RESOLVED FIXED
94 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird93 + fixed

People

(Reporter: thomas8, Assigned: mkmelin)

Details

Attachments

(3 files)

It's a bit of an edge case, but merging an unrelated error pill into the first address expanded from a mailing list is quite odd and hard to discover when it happens.

STR

  1. compose, add an incomplete address without @ (say you still need to find John's address, but you want to add a placeholder to remind yourself): John
  2. Add a mailing list (ML) pill containing foo@bar.com and bar@baz.com
  3. From ML pill context, Expand List

Actual result

  • Error pill is gone
  • unfinished address of error pill merged into first expanded address (or whichever address was following the error pill while expanding the list somewhere in the same field), invalidating the neighboring address in the process:
    John,foo@bar.com <foo@bar.com>

Expected

  • Leave the error pill alone
  • Don't merge unrelated pills when expanding mailing list

We must be doing something wrong here, because the same does not happen for copy and paste including such invalid pill (which currently also goes through a plaintext stage).

Summary: `Expand List` merges preceding error pill `John` (without @) with first address from mailing list, which is then invalid → `Expand List` merges preceding error pill `John` (without @) with first address from mailing list, which becomes invalid

Here's what happens.

This only worked by accident: makeFromDisplayAddress should be called on each address, not the toString() represenation of the array.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 94 Branch

@lasana, review ping.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/141604e05870
fix list expansion in combination with invalid pills. r=lasana

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

And now it fails where an element of addressArray has multiple addresses, for example if you drag contacts from the address book.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d302a27401de
follow-up - Fix dragging multiple addresses to the compose window. r=aleca

Comment on attachment 9240885 [details]
Bug 1730363 - fix list expansion in combination with invalid pills. r=lasana

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: error pills interact oddly with mailing list pills
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
looks safe for beta

Attachment #9240885 - Flags: approval-comm-beta?

Comment on attachment 9240885 [details]
Bug 1730363 - fix list expansion in combination with invalid pills. r=lasana

[Triage Comment]
approved for beta

Attachment #9240885 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9240885 [details]
Bug 1730363 - fix list expansion in combination with invalid pills. r=lasana

[Approval Request Comment]
Regression caused by (bug #): not a regression
User impact if declined: per bug summary
Testing completed (on c-c, etc.): c-c, beta
Risk to taking this patch (and alternatives if risky): low

Attachment #9240885 - Flags: approval-comm-esr91?

Comment on attachment 9240885 [details]
Bug 1730363 - fix list expansion in combination with invalid pills. r=lasana

[Triage Comment]
Approved for esr91

Attachment #9240885 - Flags: approval-comm-esr91? → approval-comm-esr91+

Could I get an esr91 version of this fix for uplift?

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(mkmelin+mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: