This is a tricky one. Have an add-on that listens to NotifyComposeFieldsReady and calls Recipients2CompFields(). Reply to an e-mail that has To: and Cc: recipients. When NotifyComposeFieldsReady fires, msgCompFields.to and msgCompFields.cc **are** already populated. If you now call Recipients2CompFields() you lose the Cc: recipients. I debugged it a bit, this loop: https://searchfox.org/comm-central/rev/ea1b0a2bd38a192b4520cec322e290aae0809d3b/mail/components/compose/content/addressingWidgetOverlay.js#43 `for (let pill of document.getElementsByTagName("mail-address-pill")) {` somehow only returns the To: recipients. So there might be some sort of timing issue. I guess NotifyComposeFieldsReady fires too early when the pills aren't in the DOM yet, maybe because the Cc: field hasn't put into the DOM yet. This bug will potentially affect all these 20 add-ons: https://github.com/search?q=Recipients2CompFields++path:/xall+repo%3Acleidigh%2FThunderKdB+repo%3Athundernest%2Ftb-web-ext-experiments+path:/xall/x68+repo%3Acleidigh%2FThunderKdB&type=Code I fixed the issue with a workaround in my add-on: https://pep-security.lu/dev/repos/pEp_for_Thunderbird/rev/b4378065e67b
Bug 1647050 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This is a tricky one. Have an add-on that listens to NotifyComposeFieldsReady and calls Recipients2CompFields(). Reply to an e-mail that has To: and Cc: recipients. When NotifyComposeFieldsReady fires, msgCompFields.to and msgCompFields.cc **are** already populated. If you now call Recipients2CompFields() you lose **all** recipients. I debugged it a bit, this loop: https://searchfox.org/comm-central/rev/ea1b0a2bd38a192b4520cec322e290aae0809d3b/mail/components/compose/content/addressingWidgetOverlay.js#43 `for (let pill of document.getElementsByTagName("mail-address-pill")) {` somehow returns no recipients. So there might be some sort of timing issue. I guess NotifyComposeFieldsReady fires too early when the pills aren't in the DOM yet. This bug will potentially affect all these 20 add-ons: https://github.com/search?q=Recipients2CompFields++path:/xall+repo%3Acleidigh%2FThunderKdB+repo%3Athundernest%2Ftb-web-ext-experiments+path:/xall/x68+repo%3Acleidigh%2FThunderKdB&type=Code I fixed the issue with a workaround in my add-on: https://pep-security.lu/dev/repos/pEp_for_Thunderbird/rev/b4378065e67b
This is a tricky one. Have an add-on that listens to NotifyComposeFieldsReady and calls Recipients2CompFields(). Reply to an e-mail that has To: and Cc: recipients. When NotifyComposeFieldsReady fires, msgCompFields.to and msgCompFields.cc **are** already populated. If you now call Recipients2CompFields() you lose the Cc: recipients. I debugged it a bit, this loop: https://searchfox.org/comm-central/rev/ea1b0a2bd38a192b4520cec322e290aae0809d3b/mail/components/compose/content/addressingWidgetOverlay.js#43 `for (let pill of document.getElementsByTagName("mail-address-pill")) {` somehow only returns the To: recipients. So there might be some sort of timing issue. I guess NotifyComposeFieldsReady fires too early when the pills aren't in the DOM yet, maybe because the Cc: field hasn't put into the DOM yet. This bug will potentially affect all these 20 add-ons: https://github.com/search?q=Recipients2CompFields++path:/xall+repo%3Acleidigh%2FThunderKdB+repo%3Athundernest%2Ftb-web-ext-experiments+path:/xall/x68+repo%3Acleidigh%2FThunderKdB&type=Code I fixed the issue with a workaround in my add-on: https://pep-security.lu/dev/repos/pEp_for_Thunderbird/rev/b4378065e67b