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

Fixkamo-internal
Shipped
April 25, 2026 at 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?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing