[wp-trac] [WordPress Trac] #57552: Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox. (was: Backport loading inert polyfill into an iframe)

WordPress Trac noreply at wordpress.org
Wed Feb 1 20:38:43 UTC 2023


#57552: Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in
Firefox.
----------------------------------------------+----------------------------
 Reporter:  wildworks                         |       Owner:
                                              |  hellofromTonya
     Type:  enhancement                       |      Status:  reviewing
 Priority:  normal                            |   Milestone:  6.2
Component:  Editor                            |     Version:
 Severity:  normal                            |  Resolution:
 Keywords:  has-patch gutenberg-merge commit  |     Focuses:
----------------------------------------------+----------------------------
Description changed by hellofromTonya:

Old description:

> This ticket tracks the addition of inert polyfill to the iframe editor
> instance.
> It's a backport from the Gutenberg plugin.
> (https://github.com/WordPress/gutenberg/pull/47398)

New description:

 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].

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57552#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list