Skip to content
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

Gutenberg Paragraphs: dir="LTR" results in unexpected or invalid content error #67354

Closed
supernovia opened this issue Sep 3, 2022 · 3 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@supernovia
Copy link
Contributor

supernovia commented Sep 3, 2022

Quick summary

Content creators who use RTL and LTR languages in their sites have been able to reverse text direction for a given paragraph block by editing its HTML and adding dir="LTR" or dir="RTL" . This stopped working in a recent update: creating paragraphs with that HTML edit, or editing a post that already has those types of paragraphs, results in unexpected or invalid content error messages that can't be recovered without stripping the text direction. Block recovery doesn't help; the setting gets removed.

Steps to reproduce

  1. Start by writing a new post: https://wordpress.com/post
  2. Add a paragraph
  3. Choose to edit its HTML
  4. Add dir=RTL or dir="rtl" or whatever acceptable syntax you'd like (this happens with ltr as well)
  5. Tap out of the block; you'll get a block error
  6. If you attempt recovery, the direction will be removed
dir.rtl.mov

What you expected to happen

Honestly I'd expect a text direction option in the paragraph block's settings, or just for blocks in general. But if we must hand-edit the HTML, we need to accept it as valid.

What actually happened

We get a block error with an offer to attempt recovery, which just removes the text direction.

Context

https://wordpress.com/forums/topic/left-to-right-english-text-in-right-to-left-hebrew-blogs-is-mis-directed/

Platform (Simple, Atomic, or both?)

Simple, Atomic, Self-hosted

Theme-specific issue?

n/a

Browser, operating system and other notes

n/a - this isn't a browser so much as an issue with what code we accept as valid.

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

The workaround is to ignore the error and publish anyway, but it's kind of annoying to no longer be able to see the block text in the editor. Or, we can convert to an HTML block instead. But it would be better to fix the issue.

@supernovia supernovia added [Type] Bug When a feature is broken and / or not performing as intended User Report labels Sep 3, 2022
@github-actions github-actions bot added [Platform] Atomic [Platform] Simple [Pri] Low Address when resources are available. labels Sep 3, 2022
@cuemarie
Copy link

cuemarie commented Sep 7, 2022

📌 SCRUBBING : RESULT

📌 FINDINGS/SCREENSHOTS/VIDEO

  • I can replicate this everywhere, just as @supernovia has described above.

Examples

Simple

Screen.Capture.on.2022-09-07.at.11-24-12.mp4

Self-Hosted
Screen Shot 2022-09-07 at 11 26 45 AM

📌 ACTIONS

@cuemarie cuemarie added [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Pri] Normal Schedule for the next available opportuinity. and removed [Pri] Low Address when resources are available. labels Sep 7, 2022
@mrfoxtalbot mrfoxtalbot moved this to To triage in Dotcom Core Fix Needed Sep 2, 2024
@annezazu
Copy link

annezazu commented Sep 9, 2024

The related Gutenberg issue has been resolved: WordPress/gutenberg#15349

Closing this out as a result!

@annezazu annezazu closed this as completed Sep 9, 2024
Copy link

github-actions bot commented Sep 9, 2024

Support References

This comment is automatically generated. Please do not edit it.

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants