slate icon indicating copy to clipboard operation
slate copied to clipboard

Backspace Key on Android

Open pierre-lgb opened this issue 3 years ago • 5 comments

Description This is a problem that happens on Android. When I keep pressing the backspace key, the cursor is "jumping" over some words. It seems to happen when the block / leaf type changes.

What is strange is that it doesn't happen on the Rich Text Editor example from slatejs website, but when I create an editor locally (even with the exact same code), the problem happens... So normally there should be a way to solve this if it works on slatejs website, but I don't know what :/

Recording

https://user-images.githubusercontent.com/83542054/122991461-55f33980-d3a5-11eb-980d-c5d2af9545bf.mp4

Sandbox https://codesandbox.io/s/9yoji

Environment

  • Slate Version: 0.63
  • Operating System: Android 11
  • Browser: Chrome, Brave (it doesn't happen on Firefox, but on Firefox it doesn't automatically switch to the above block, I have to manually select it.)

If any additionnal information needed, please let me know.

pierre-lgb avatar Jun 22 '21 20:06 pierre-lgb

Hi @pierre-lgb

When posting a bug related to Android, it will be helpful to provide the specific version of Android that is running. Thanks.

thesunny avatar Jul 04 '21 05:07 thesunny

Hi @pierre-lgb

When posting a bug related to Android, it will be helpful to provide the specific version of Android that is running. Thanks.

It happens on Android 11

pierre-lgb avatar Jul 10 '21 18:07 pierre-lgb

@thesunny

On both the codesandbox and []slatejs richtext I have problems.

  • Samsung Galaxy S20 Note Ultra 5G
  • Android 11
  • Chrome for Android 95.0.4638.74
  • Firefox 94.1.2
  • Microsoft Swiftkey 7.9.1.3

What I did was click at the end of the element and then just keep Backspace pressed.

On Chrome for Android I am left with this:

And on Firefox it gets blocked at the bold, word. Weird part is that event after multiple taps on Backspace it does not move.

Notes:

  • Could not reproduce Samsung Keyboard on Chrome
  • But on Firefox, the Samsung Keyboard was behaving funny
    • When trying to remove the entire text, it stopped at the beginning of the last line.

    • When trying to delete the first line

      This is editable rich text, much better than a

      It just did not remove any character.

aifrim avatar Nov 19 '21 05:11 aifrim

This seems to have been fixed on main branch now. Refer to my comment https://github.com/ianstormtaylor/slate/issues/4691#issuecomment-986389528

AkromDev avatar Dec 06 '21 02:12 AkromDev

Seems related to: https://github.com/ianstormtaylor/slate/issues/4715

TrySpace avatar Apr 22 '22 13:04 TrySpace