Closed Bug 1656666 Opened 4 years ago Closed 4 years ago

Mail compose: when changing From: field, CC & BCC buttons switch their order

Categories

(Thunderbird :: Message Compose Window, defect)

defect

Tracking

(thunderbird_esr68 unaffected, thunderbird_esr78 fixed, thunderbird80 fixed)

VERIFIED FIXED
81 Branch
Tracking Status
thunderbird_esr68 --- unaffected
thunderbird_esr78 --- fixed
thunderbird80 --- fixed

People

(Reporter: ak.bugzilla, Assigned: aleca)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 Edg/84.0.522.50

Steps to reproduce:

I have 4 mail identities in Thunderbird.
Open a new mail compose window. Don't activate CC and BCC fields (keep the buttons next to the From: field). Choose a different From: identity.

Actual results:

CC and BCC buttons switch their position with every change of the mail identity.
From: field CC BCC >>
< change mail identity >
From: field BCC CC >>
The order of the buttons isn't related to a certain identity. If you switch from identity 1 to 2 to 3 back to 1, you end up with a different order for identity 1.

Expected results:

Buttons should always keep their order.

related to bug 1635124 ?

Flags: needinfo?(bugzilla2007)

Confirming exactly as described.

(In reply to Wayne Mery (:wsmwk) from comment #1)

related to bug 1635124 ?
No, this bug is also happening with mouse, so premature application of identity when keyboard navigating the From dropdown is not involved here.
We should fix this because it's really weird for CC/BCC buttons to change their location without apparent reason.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bugzilla2007)

Alex, do you want a regression window for this? If yes, pls set regressionwindow-wanted keyword.

Blocks: tb78found
Flags: needinfo?(alessandro)
Keywords: regression

Has this regressed or was it always like this after the pills landed?

This is weird, those buttons are statically written in the XHTML file and should simply be hidden/showed based on the type of identity (mail, nntp).
I never experienced this issue while building it, so it might be a regression, but I'm not 100% sure.
I'll investigate this to understand the reason of this issue and I'll know if it's a regression or something we've been having since day 1 of the pills implementation.

Flags: needinfo?(alessandro)
Assignee: nobody → alessandro
Status: NEW → ASSIGNED
Attached patch 1656666-compose-buttons.diff (obsolete) — Splinter Review

This bug seems to have always been present since the first implementation.
Good find.

Attachment #9167760 - Flags: review?(mkmelin+mozilla)

The better solution would be to not run the updateUIforIMAPAccount at all if the previous and current account type match the same recipient.
We currently only check for the nntp account type when deciding if a UI update is necessary.
What's the full list of all the account types we handle?
Is it a finite list or it might stumble upon some obscure protocols we don't know?

updateUIforIMAPAccount is wrongly named, it could be any mail type. We have at least imap,movemail,pop3,none,rss,nntp (not all have compose capabilities), and then there are types from extensions such as "exchange"

Comment on attachment 9167760 [details] [diff] [review]
1656666-compose-buttons.diff

Review of attachment 9167760 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/compose/content/addressingWidgetOverlay.js
@@ +308,3 @@
>    for (let label of document.querySelectorAll(".mail-label")) {
> +    // Always keep the overflow button last.
> +    extraRecipients.insertBefore(label, extraRecipientsLabel);

doesn't seem you should keep inserting this inside the loop
Attachment #9167760 - Flags: review?(mkmelin+mozilla)

All right, this should do it.
I renamed the method as updateUIforMailAccount and excluded the extra recipients overflow button from the reordered labels.

Attachment #9167760 - Attachment is obsolete: true
Attachment #9168219 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9168219 [details] [diff] [review]
1656666-compose-buttons.diff

Review of attachment 9168219 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thx! r=mkmelin
Attachment #9168219 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: --- → 81 Branch

Comment on attachment 9168219 [details] [diff] [review]
1656666-compose-buttons.diff

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Users with multiple identities will experience an order change of the Cc and Bcc labels when changing identity in the compose window.
Testing completed (on c-c, etc.): soon on c-c
Risk to taking this patch (and alternatives if risky): low as the changes are very minimal

Attachment #9168219 - Flags: approval-comm-esr78?
Attachment #9168219 - Flags: approval-comm-beta?

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b27e202977b9
Fix Cc and Bcc buttons changing position when switching identity in compose dialog. r=mkmelin

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

Comment on attachment 9168219 [details] [diff] [review]
1656666-compose-buttons.diff

[Triage Comment]
Approved for beta

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

Looks fixed in my testing of the 80.0b2 release candidate on Ubuntu 18.04.4.

Comment on attachment 9168219 [details] [diff] [review]
1656666-compose-buttons.diff

[Triage Comment]
Approved for esr78

Attachment #9168219 - Flags: approval-comm-esr78? → approval-comm-esr78+
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: