Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Fix address fields acting weird and breaking Send button - #40

Merged
snipsnipsnip merged 2 commits into
exteditor:masterfrom
snipsnipsnip:workaround-doubling-recipients-r2
Oct 8, 2019
Merged

snipsnipsnip merged 2 commits into
exteditor:masterfrom
snipsnipsnip:workaround-doubling-recipients-r2

Conversation

@snipsnipsnip

@snipsnipsnip snipsnipsnip commented Oct 7, 2019 •

Copy link
Copy Markdown
Member

Another try on #35 and (hopefully) fix #39.

I realized that Compfields2Recipients() --- which is a Thunderbird internal function External Editor relies on to update address fields --- is solely used in the initialization of the compose window. That is, the function is not expected to be called multiple times.

On the other hand, awAddRecipients() have more callers than
Compfields2Recipients(). It looks like they don't break the address fields behavior.

Edit: awRemoveRecipients() also looked promising, but it didn't fit in my case where address may not be normalized in MIME format.

LoadIdentity() mentioned in the comment is here

@snipsnipsnip snipsnipsnip changed the title Workaround doubling recipients r2 Fix address fields acting weird Oct 7, 2019
@snipsnipsnip snipsnipsnip changed the title Fix address fields acting weird [WIP] Fix address fields acting weird Oct 7, 2019
@snipsnipsnip

snipsnipsnip commented Oct 7, 2019 •

Copy link
Copy Markdown
Member Author

62c56b0 have another problem that addresses added in the external editor are ignored if it doesn't fit in existing address inputs... It was just a thinko/typo, but it looks like we can't rely on awRemoveRecipients since the function only work well when all the address fields are correctly formatted in MIME, which is not the case here.

Use `awAddRecipients` instead of trying to tweak somehow broken
`CompFields2Recipients` as we did in exteditor#36.

Also, I wonder if writing back address field changes to
`gMsgCompose.compFields` is really necessary. Removed them as a trial.
@snipsnipsnip
snipsnipsnip force-pushed the workaround-doubling-recipients-r2 branch from bade23c to 5ef8756 Compare October 8, 2019 14:16
@snipsnipsnip snipsnipsnip changed the title [WIP] Fix address fields acting weird Fix address fields acting weird Oct 8, 2019
@snipsnipsnip
snipsnipsnip merged commit 8f0d208 into exteditor:master Oct 8, 2019
@snipsnipsnip
snipsnipsnip deleted the workaround-doubling-recipients-r2 branch October 8, 2019 14:24
@snipsnipsnip snipsnipsnip changed the title Fix address fields acting weird Fix address fields acting weird and breaking Send button Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send button and address fields won't work sometimes after closing external editor in Thunderbird 68

1 participant