Closed Bug 1696789 Opened 4 years ago Closed 4 years ago

Improve address rows selector in pillifyRecipients() to exclude custom headers

Categories

(Thunderbird :: Message Compose Window, defect)

defect

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: thomas8, Assigned: thomas8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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

While bug 1682147 incidentally fixed bug 1688336 by adding optional chaining operator ?. to an expected autocomplete input, we should adjust the selector for the address rows to only match rows with autocomplete inputs (vs. plain custom headers).

https://searchfox.org/comm-central/rev/460e6636b38cec25bd14bdc542e254ceb0e016a9/mail/components/compose/content/MsgComposeCommands.js#5003-5007

function pillifyRecipients() {
  for (let row of document.querySelectorAll(".address-row:not(.hidden)")) {
    let input = row.querySelector(
      `input[is="autocomplete-input"][recipienttype]`
    );
    // If we find a leftover string in the input field, create a pill. If the
    // newly created pill is not a valid address, the sending will stop.
    if (input?.value.trim()) {
      recipientAddPills(input);
    }
  }
}
Status: NEW → ASSIGNED

Selector cleanup, now matching only the autocomplete inputs that we want.

Attachment #9207339 - Flags: review?(alessandro)
Attachment #9207339 - Flags: review?(alessandro) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7091e06c86a6
Improve selector in pillifyRecipients() to match only autocomplete row inputs. r=aleca

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

Attachment

General

Created:
Updated:
Size: