mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 16:13:15 +00:00
A draft does not have to come from the composer: the JMAP API, another client, an automation or a template can leave one in Drafts, and its paragraphs carry no style, so every mail client lays them out with the user agent's 1em margins. Since #1340 the composer stamps its own 4px margin on every paragraph it serializes, so opening such a draft to read it over and pressing Send re-flowed the message, and the composer showed it at a spacing the recipient would never see. What is loaded now keeps the spacing it came with: a paragraph with text and no margin of its own is stamped with the mail default on the way in, so the editor shows the message's own layout and what goes out is what came in. The empty paragraph a new message is scaffolded with is left alone, as are table cells, the quoted original and an embedded signature. addParagraphSpacing skips a paragraph that already states a margin, so nothing is declared twice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>