diff --git a/packages/playground/blueprints/src/lib/steps/install-plugin.ts b/packages/playground/blueprints/src/lib/steps/install-plugin.ts index 036feb8ba6..2b13fda74a 100644 --- a/packages/playground/blueprints/src/lib/steps/install-plugin.ts +++ b/packages/playground/blueprints/src/lib/steps/install-plugin.ts @@ -83,7 +83,7 @@ export const installPlugin: StepHandler> = async ( ); } - await maybeApplyGutenbergPatch(playground); + await applyGutenbergPatchOnce(playground); } catch (error) { console.error( `Proceeding without the ${zipNiceName} plugin. Could not install it in wp-admin. ` + @@ -93,64 +93,87 @@ export const installPlugin: StepHandler> = async ( } }; -async function maybeApplyGutenbergPatch(playground: UniversalPHP) { +async function applyGutenbergPatchOnce(playground: UniversalPHP) { /** - * The patch below is no longer necessary as it's been fixed upstream: + * Ensures the block editor iframe is controlled by the playground + * service worker. Tl;dr it must use a HTTP URL as its src, not a + * data URL, blob URL, or a srcDoc like it does by default. * - * https://github.com/WordPress/gutenberg/pull/50875 + * @see https://github.com/WordPress/wordpress-playground/pull/668 * - * It can be removed in the next few WordPress releases. - * - * --- - * - * Pair the site editor's nested iframe to the Service Worker. - * - * Without the patch below, the site editor initiates network requests that - * aren't routed through the service worker. That's a known browser issue: - * - * * https://bugs.chromium.org/p/chromium/issues/detail?id=880768 - * * https://bugzilla.mozilla.org/show_bug.cgi?id=1293277 - * * https://github.com/w3c/ServiceWorker/issues/765 - * - * The problem with iframes using srcDoc and src="about:blank" as they - * fail to inherit the root site's service worker. - * - * Gutenberg loads the site editor using