[Bug]: Deleting text on Android causes text to duplicate.
What happened?
When attempting to delete text on Android the text is deleted but then whatever was deleted is duplicated many times. This is happening on Android Pixel 8 in both the app and on the web.
Distribution version
Linux
App Version
0.23.2
What browsers are you seeing the problem on if you're using web version?
No response
Are you self-hosting?
- [x] Yes
Self-hosting Version
0.23.2
Relevant log output
Anything else?
No response
Issue Status: 🆕 *Untriaged
*🆕 Untriaged
The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md
This is an automatic reply by the bot.
I have noticed similar text input problems on my Samsung S23. Sometimes, using autocorrect will type in the text, but the app doesn't seem to know it's there. If you hit backspace, it erases text from the middle of the sentence as if what was inserted didn't exist. Closing the document, losing my changes, and reopening it is the only way I found around those desyncs.
This is happening with the Futo Keyboard but doesn't seem to happen with Gboard.
This is happening with the Futo Keyboard but doesn't seem to happen with Gboard.
I've seen it on the Samsung keyboard, but I'm not sure this is an android specific issue anymore. I've seen something similar on Firefox (Linux) on my laptop as well. I had strange thing happen when copy/pasting text and deleting text in the middle of words.
More poeple reported this: #13043
I also experienced the same on android. 0.24.1 app and server. self-hosted, but happens on locally stored docs as well.
When tapping underlined text (where the cursor is), or any content within the same block the underlined text is duplicated. When altering in any way, same behavior. Only pressing Enter/Return to start a new line/block is it not duplicating, and in case of initial input in new lines. Cursor can be moved via space bar sliding without duplication as well.
I used HeliBoard keyboard.
EDIT: After some testing this issue has to do with the word suggestion and/or grammar correction feature. With that turned off, editing works fine.
Having identical issue with florisboard here. This is a critical bug that should get addressed immediately. It is a complete showstopper and not something that should go unaddressed for months.
EDIT: App version is 0.24.2
I'm able to reproduce the bug in https://try-blocksuite.vercel.app
Happens with Heliboard too
I also have this issue. Here's some documentation on it and a video of the behavior: https://community.affine.pro/c/bug-reports/strange-typing-behavior-on-android
Key points discovered:
- Happens in all client and server configurations: affine cloud with android app, self-host with android app, self-host accessed through browser
- Happens in all network configurations: wifi, airplane mode, cell network
- Happens regardless of keyboard used or its settings
I am having trouble seeing how this isn't the absolute top priority for the project. Not only is text input the main way users will interact with Affine, there have also been multiple people reporting this issue through multiple different means for months now. It isn't a good sign when someone have the time to figure out how to self-host Obsidian and migrate over all of their content before a major issue like this is fixed.
Right now, text input is borderline unusable. You can't copy/paste, accept a correction, or suggestions, or auto-correct, on pretty much every devices out there, and the issue isn't even triaged yet.
Meanwhile, nearly all of the most recent commits to this projects are about adding AI and paid integrations.
I agree, it's a litmus test for mine. Dipping my toes in Affine... but I can't see it being a seriour project when a huge issue like this exists for months.
I dont know if my issue is related, but in my android app I cannot edit text really. I can type something, but when I hit Enter or sometimes even just Space, the text disappears again. Should I open a new Issue for that?
Just a heads up to try the latest v0.1.26 release of FUTO Keyboard. I have had no crazy text duplication issues or bugs using the AFFiNE app with it, even with spelling suggestions enabled. Have not tested on web app, so ymmv there.
Switching to gboard (previously on my tab s8’s default samsung keyboard) seems to have resolved the issue for me
Quoting from Discord, seems to be an official account:
silencer.xyz — Yesterday at 9:57 PM We noted this one for sure. Since our Android developer just left the firm a few weeks ago and we are looking for a new androd developer at the moment. That's why we can't make progress on Andorid side at the moment. We will figure this out soon tho!
Switching to gboard (previously on my tab s8’s default samsung keyboard) seems to have resolved the issue for me
Using GBoard here, bug is same but different. :(
Related posts on Discord:
- Cannot edit text in AFFiNE Android when using certain type of Keyboard
- Android: Line content is deleted when pressing space
- Android: text gets duplicated when pressing backspace
Interestingly, I found very similar bugs in the notes app Capacities. Won't link to that, but same basic symptoms. I suspect both are using the same editor control which has the same bugs. :(
I found some similar issues from react native:
- https://github.com/facebook/react-native/issues/11068
- https://github.com/facebook/react-native/issues/30503
- https://github.com/facebook/react-native/issues/34668
I'll try and open a PR today if I'm able to fix it this after school.
I tried to implement a fix but it touches more things than I am comfortable with as a new contributor but someone who is familiar with the codebase should be able to fix it with relative ease.
This commit (https://github.com/facebook/react-native/commit/ab3c00de2ca1cff959c724c09f7f61c3706b2904) explains the problem really well:
How the issue happened:
- User types: A (ComposingText Span becomes (0,1), composingWord: "A")
- Javascript replaced A with a, ComposingText Span was removed from getText()
- User types a new character: r (ComposingText, defaulting to selection, from selection, empty string is replaced with word "Ar") => Complete text: aAr => letter duplication.
How it works with the changes applied:
- User types: A (ComposingText Span becomes (0,1), composingWord: "A")
- Javascript replaces A with a, (ComposingText Span (0,1) is re-set after replace)
- User types a new character: r (ComposingText (0,1), "a" word is replaced with word "Ar". ComposingText becomes (0,2) "Ar")
- Javascript replaced Ar with ar, (ComposingText Span (0,2) is re-set after replace) => Complete text: ar => no letter duplication
- User selects suggestion "Are" (ComposingText Span (0,2) "ar" is replaced with new word and space "Are ")
- CompleteText: "Are "
- Javascript replaces "Are " with "are " (ComposingText Span doesn't exist, no string after space " ")
@L-Sun @Saul-Mirone Sorry to bother but can you help us figure this one out?