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 to delete letters is misbehaving #152

Open
ryrona2 opened this issue Jun 1, 2024 · 5 comments
Open

Backspace to delete letters is misbehaving #152

ryrona2 opened this issue Jun 1, 2024 · 5 comments
Labels
bug Something isn't working upstream Upstream bug

Comments

@ryrona2
Copy link

ryrona2 commented Jun 1, 2024

If I rapidly click or hold backspace on the on-screen keyboard, it will randomly delete letters several positions before where the marker is. Either almost always or always the closest space. This is a huge frustration point, as it means I have to click backspace slowly, and I am a fast typist.

Let's say that I want to edit this text because I mistyped (note, marker is the | at the end):

This is a very long sentence where I hvae missplee |

After rapidly clicking or holding backspace, the text becomes:

This is a very longsentencewher|

At this point, it may be tempting to just keep clicking backspace and retype those words too, but that just makes the problem even worse.

This happens on the latest GrapheneOS (version 2024052100) as well as earlier versions too. It happens regardless of keyboard language. It is the built-in keyboard in GrapheneOS, I have not replaced it. BeauTyXT is latest version (0.21.2), and was installed from Accrescent. It is verified genuine by AppVerifier. This problem with misbehaving backspace does not happen in any other app, only BeauTyXT. Factory defaulting the device and reinstalling does not help.

@soupslurpr
Copy link
Owner

Unfortunately it's an issue with the Jetpack Compose TextField being buggy with AOSP's keyboard. You can see it in other apps that use Jetpack Compose as well such as Accrescent and many others.

@soupslurpr soupslurpr added the upstream Upstream bug label Jun 2, 2024
@ryrona2
Copy link
Author

ryrona2 commented Jun 8, 2024

I looked around a little.

I found these open tickets on Google bug tracker, at least the first one describing this identical issue:
https://issuetracker.google.com/issues/294102838
https://issuetracker.google.com/issues/221636606

The tickets have been open since 2022, with many being affected, but no apparent attempts to fix the issues in Jetpack Compose have been made.

Someone wrote this, I don't know if it helps: "I noticed that happening when the code executes on the Dispatchers.Main. I switched the dispatcher to Dispatchers.Default and now the text inputs work fine." (https://issuetracker.google.com/issues/217570481)

Someone else linked to this site that seems to explain a very similar problem and how to fix or work around it in the app using the TextField: https://medium.com/androiddevelopers/effective-state-management-for-textfield-in-compose-d6e5b070fbe5

There is also vague statements about a new TextField implementation coming that lack these issues entirely, so it doesn't have to be worked around.

@ryrona2
Copy link
Author

ryrona2 commented Jun 8, 2024

Disabling "Show correction suggestions" makes the problem stop, so it is a race condition with that functionality probably. But that of course makes the keyboard pretty useless in its own way too.

@soupslurpr
Copy link
Owner

soupslurpr commented Jun 8, 2024

Disabling "Show correction suggestions" makes the problem stop, so it is a race condition with that functionality probably. But that of course makes the keyboard pretty useless in its own way too.

Ah I see okay. That makes sense since it was always getting highlighted in a weird way when deleting and triggering the bug.

@soupslurpr soupslurpr added the bug Something isn't working label Jun 15, 2024
@soupslurpr
Copy link
Owner

I'll look into this some more in NewTyXT after finishing basic text editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Upstream bug
Projects
Status: Todo
Development

No branches or pull requests

2 participants