Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordPress: Fix the srcDoc patch in WordPress block-editor.js #408

Merged
merged 1 commit into from
May 22, 2023

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.

1 participant