From e8096f08834f0a49388c1011fb42b81fce42e253 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Wed, 1 Feb 2023 20:44:11 +0000 Subject: [PATCH] Editor: Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox. Adds the polyfill script to the iframe to make the `inert` attribute work correctly in Firefox. This solves the problem that the site editor can operate on the block editor in Firefox even in browse mode. Why? The inert attribute is intended to render the element and its sub-tree elements `inert`, but Firefox doesn't support this attribute. For the `inert` attribute to work as intended in Firefox, even within an iframe, the script needs to be injected into the iframe as well as the global document. References: * [https://github.com/WordPress/gutenberg/pull/47398 Gutenberg PR 47398]. Follow-up to [53160]. Props wildworks, mamaduka, youknowriad. Fixes #57552. Built from https://develop.svn.wordpress.org/trunk@55181 git-svn-id: http://core.svn.wordpress.org/trunk@54714 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-editor.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index 4a62837f49..bbb139d756 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -298,7 +298,9 @@ function get_legacy_widget_block_editor_settings() { function _wp_get_iframed_editor_assets() { global $pagenow; - $script_handles = array(); + $script_handles = array( + 'wp-polyfill', + ); $style_handles = array( 'wp-edit-blocks', ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2d1cd4684d..eb13adec1c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55180'; +$wp_version = '6.2-alpha-55181'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.