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

Backspace not correctly deleting last letter if RTL language is used. #15553

Closed
KokkieH opened this issue May 10, 2019 · 0 comments · Fixed by #15496
Closed

Backspace not correctly deleting last letter if RTL language is used. #15553

KokkieH opened this issue May 10, 2019 · 0 comments · Fixed by #15496
Labels
[Type] Bug An existing feature does not function as intended

Comments

@KokkieH
Copy link

KokkieH commented May 10, 2019

Describe the bug
Using a RTL language like Hebrew or Arabic, the backspace key does not correctly delete the last letter typed (the letter to the right of the cursor) but instead still appears to try and delete the character to the left of the cursor. This leads to paragraph breaks being deleted in some cases.

To reproduce
Steps to reproduce the behavior:

  1. Go to '.../wp-admin/options-general.php`
  2. Set the site language to a RTL language (I tested in Hebrew and Arabic)
  3. Create a new post in the block editor
  4. With the computer's input language set to the same language, type a few words, press return to create a new paragraph block, and type some more
  5. Press the backspace key to try and delete the last letter typed

Expected behavior
For the last letter typed to be deleted

What happened
Instead of the last letter, to the right of the cursor, being deleted, the break between the two blocks was deleted, shifting the text in the second block into the first with the cursor positioned to the right of the second block's text. In other words, repeated pressing of backspace then starts to delete the first block's text, not the second block you were last typing in.

Screenshots
I don't know Hebrew, so just typed random letters to test, but it illustrates the issue:

rtl

Desktop (please complete the following information):

  • OS: Tested in Windows 7 and Mac OS X 10.14.4
  • Browser: Most recent versions of both Chrome and Firefox

Additional context

  • Tested on WordPress 5.2
  • Reported by a WordPress.com user in the forums, but I could replicate on both WordPress.com and stand-alone WordPress sites
@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants