-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Editor: Add inert polyfill to iframe #47398
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youknowriad
approved these changes
Jan 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me
This was referenced Jan 25, 2023
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Feb 1, 2023
…t 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: * [WordPress/gutenberg#47398 Gutenberg PR 47398]. Follow-up to [53160]. Props wildworks, mamaduka, youknowriad. Fixes #57552. git-svn-id: https://develop.svn.wordpress.org/trunk@55181 602fd350-edb4-49c9-b593-d223f7449a82
github-actions bot
pushed a commit
to gilzow/wordpress-performance
that referenced
this pull request
Feb 1, 2023
…t 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: * [WordPress/gutenberg#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: https://core.svn.wordpress.org/trunk@54714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Feb 1, 2023
…t 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: * [WordPress/gutenberg#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
VenusPR
added a commit
to VenusPR/Wordpress_Richard
that referenced
this pull request
Mar 9, 2023
…t 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: * [WordPress/gutenberg#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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Browser Issues
Issues or PRs that are related to browser specific problems
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #47190
What?
This PR adds a polyfill script to the iframe to make the
inert
attribute work correctly in Firefox. This solves the problem, as reported in #47190, 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. Therefore, a polyfill script has been introduced, but as investigated in this comment, this polyfill doesn't seem to apply to theinert
attribute in iframe. In order for theinert
attribute to work as intended in Firefox, even within an iframe, we need to inject the script into the iframe as well as the global document.How?
Added polyfill to script handles for iframes. If this PR is merged, I would like to submit a ticket and PR for backporting to WordPress 6.2 based on #47187.
Testing Instructions