You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Go to '.../wp-admin/options-general.php`
Set the site language to a RTL language (I tested in Hebrew and Arabic)
Create a new post in the block editor
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
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:
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
The text was updated successfully, but these errors were encountered:
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:
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:
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: