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
Gallery block: fix problem with caption showing encode tags when not selected #35131
Conversation
…gure when not focused
Size Change: -66 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
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.
Nice work @glendaviesnz, this is testing well for me:
✅ With a user without the unfiltered_html
capability, I could recreate the issue, and with this PR applied, toggling between the gallery caption and the rest of the post preserves the formatting without rendering the encoded tags
✅ Saved post content is unaffected, and the experience feels the same with an admin user
✅ The caption formatting toolbar disappears when I select the media placeholder, de-select the gallery, or select a gallery image
✅ The change also fixes an extra click that seemed to be required for the user without the unfiltered_html
capability (which also nudged the viewport position), so clicking between another block and the gallery caption feels smoother now, too 👍
Before | After |
---|---|
LGTM!
Description
If logged in as a user without unsafe html privileges the Gallery caption in the refactored Gallery block shows encoded html tags when the caption is not selected. This PR removes the toggle between
RichText
andfigure
and keeps it asRichText
Fixes: #34829
Testing
Author
Screenshots
Before:
After: