| 1 | | This ticket tracks the addition of inert polyfill to the iframe editor instance. |
| 2 | | It's a backport from the Gutenberg plugin. (https://github.com/WordPress/gutenberg/pull/47398) |
| | 1 | 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. |
| | 2 | |
| | 3 | Why? |
| | 4 | |
| | 5 | 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. |
| | 6 | |
| | 7 | References: |
| | 8 | * [https://github.com/WordPress/gutenberg/pull/47398 Gutenberg PR 47398]. |