slate
slate copied to clipboard
Backspace Key on Android
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.
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.
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
@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.
-
This seems to have been fixed on main branch now. Refer to my comment https://github.com/ianstormtaylor/slate/issues/4691#issuecomment-986389528
Seems related to: https://github.com/ianstormtaylor/slate/issues/4715