-
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
Improve media & text block on IE. #10812
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
Note that style attributes must be whitelisted. This was missed for
grid-template-columns
previously, and can result in invalidated blocks for non-administrator users.See also: https://core.trac.wordpress.org/ticket/46597
We should probably add a filter to include
-ms-grid-columns
for thesafe_style_css
set in the plugin, and propose a complementing upstream Trac ticket once this is merged.https://developer.wordpress.org/reference/hooks/safe_style_css/
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.
Hi @aduth, this PR is not changing the block save function/markup of the block. At the time (before 5.0 release) in talks with @mtias it was discussed if we should add an IE specific style to the block inline styles and we decided not to do it. The disadvantage is that on the website frontend the image always appears at 50% width, on the backend we add the correct style so it appears on the correct width.
Given that we are not adding -ms-grid-columns on the save function I don't think there is a need to update filters compared to what we are already doing on the patches available at https://core.trac.wordpress.org/ticket/46597.
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.
Ah, you're right. Sorry, I missed that.
I guess it makes me wonder then what's the purported benefit, if we're only solving the issue in the editor, but not on the front-end. To me, it would seem the latter would be the more important anyways. At the very least, should it not be marked as fixing #11577 ?
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.
Currently, the block does not work in IE (front-end and editor), the media element and the content don't event appear side by side. This PR fixes most of the problems on the front end (in the editor fixes all of them). The layout appears side by side the vertical-align options work, the background position change works, the only thing that does not work is the resizing on the front end (e.g: things appear always with the default 50% width), compared to the current state is a big improvement. Issue #11577 says "Media & Text block is not aligning in IE 11" and I guess that problem is fixed the alignments work as expected, maybe we can close and add a comment specifying that just the resizing functionality does not work on the front end.