KamoCRM

Drop Shadow DOM in email renderer so overflow-x-auto fires

Fixkamo-internal
Shipped
25 ஏப்ரல், 2026 அன்று 10:10 PM UTC
Author
kamo
Commit
4e54fad

Shadow DOM was the root cause. Wide email content (fixed-width tables) inside the shadow tree painted past the host without contributing to the host's layout box, so the parent body wrapper's overflow-x-auto never detected the overflow and never produced a scrollbar. Replacing the shadow root with a plain div + dangerouslySetInnerHTML makes the email body's wide descendants regular DOM children of the scroll container, which correctly triggers the horizontal scrollbar inside the email body. The message header is a sibling of the body wrapper, so it stays at column width and is unaffected. Sanitization (sanitizeEmailHtml) still runs and is the security boundary; the shadow tree was an extra CSS-isolation layer, not the sanitizer itself.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing