mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-07 05:04:58 +08:00
fix(iframe): give each message a proper doctype
This commit is contained in:
parent
ff7e72a361
commit
f7ac4b70d7
1 changed files with 7 additions and 0 deletions
|
@ -36,6 +36,13 @@ class EmailFrame extends React.Component
|
|||
doc = React.findDOMNode(@).contentDocument
|
||||
doc.open()
|
||||
|
||||
# NOTE: The iframe must have a modern DOCTYPE. The lack of this line
|
||||
# will cause some bizzare non-standards compliant rendering with the
|
||||
# message bodies. This is particularly felt with <table> elements use
|
||||
# the `border-collapse: collapse` css property while setting a
|
||||
# `padding`.
|
||||
doc.write("<!DOCTYPE html>")
|
||||
|
||||
EmailFixingStyles = document.querySelector('[source-path*="email-frame.less"]')?.innerText
|
||||
EmailFixingStyles = EmailFixingStyles.replace(/.ignore-in-parent-frame/g, '')
|
||||
if (EmailFixingStyles)
|
||||
|
|
Loading…
Add table
Reference in a new issue