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

RTL (Right-to-left) support is broken on Chrome #1059

Closed
railsbob opened this issue May 15, 2023 · 0 comments · Fixed by #1060
Closed

RTL (Right-to-left) support is broken on Chrome #1059

railsbob opened this issue May 15, 2023 · 0 comments · Fixed by #1060

Comments

@railsbob
Copy link
Contributor

railsbob commented May 15, 2023

Trix uses Chome's dirname and FormData API to determine text direction and wrap the content in a dir="rtl" element. Chrome recently changed the behaviour, and the dirname on input doesn't set the direction on the containing form. This results in the RTL text to align left. Here's a minimal example that demonstrates the breaking change.

Steps to Reproduce
  1. Use Chrome v113.0.5672.92
  2. Use any RTL language keyboard (Arabic, for example) and input text in the editor.
  3. The text's wrapper div element doesn't have dir="rtl", and the text is aligned left instead of right.
Details
  • Trix version: 2.0.4
  • Browser name and version: Chrome 113.0.5672.92
  • Operating system: macOS 13.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant