Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented May 22, 2023

Gutenberg loads the site editor using <iframe srcDoc="<!doctype html>" to force the standards mode and not the quirks mode:

WordPress/gutenberg#38855

This commit patches the site editor to achieve the same result via <iframe src="/doctype.html"> and a doctype.html file containing just <!doctype html>. This allows the iframe to inherit the service worker and correctly load all the css, js, fonts, images, and other assets.

More details: #91 (comment)

Gutenberg loads the site editor using <iframe srcDoc="<!doctype html>"
to force the standards mode and not the quirks mode:

WordPress/gutenberg#38855

This commit patches the site editor to achieve the same result via
<iframe src="/doctype.html"> and a doctype.html file containing just
`<!doctype html>`. This allows the iframe to inherit the service worker
and correctly load all the css, js, fonts, images, and other assets.

More details: #91 (comment)
@adamziel adamziel added [Type] Bug An existing feature does not function as intended WordPress bundle labels May 22, 2023
@adamziel adamziel merged commit a9dd100 into trunk May 22, 2023
@adamziel adamziel deleted the patch-srcdoc-in-recent-wp branch May 22, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants