-
Notifications
You must be signed in to change notification settings - Fork 874
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 Draft.js input problems #10201
Comments
Related #10208 |
I've tested a bit also in Firefox and there are similar issues, sometimes a bit different (for example I wasn't able to reproduce the select/deselect loop in Firefox). Regardless, I'd suggest a couple things:
|
I think this is the main issue. The issue doesn't occur when all snippet variables are translated. My thinking is that this is caused by the mismatch between the text direction of the element outside the snippet variable and the text direction inside the snippet variable. I am not entirely sure if it possible to fix this, because the DraftJS state wouldn't 'know' anything about right-to-left or left-to-right. The state works independently of text direction because it works with the offset within the text.
In the latest version, we set the |
Set your language to a RTL language, for example Hebrew, to witness the following issues:
Typing between variables moves variable and typed text:
It's not possible to move your cursor to before (from an RTL perspective) the first entity by using the arrow keys:
When you click before the first entity, you can't move past that entity when using the arrow keys:
This 'being stuck' behavior also happens in some specific other situations. Pushing the left arrow on time, while you actually want to go right, 'solves' it (i.e. the cursor will jump out of the infinite select-deselect loop):
The text was updated successfully, but these errors were encountered: