LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.16k stars 166 forks source link

Issues with typing (backspace) #194

Closed PassionateG1t closed 1 month ago

PassionateG1t commented 2 years ago

When pressing the backspace several times, sometimes the last word would go back one character and attach itself to the one behind it.

Say I've written the following sentence:

I can't believe you've done this

If I delete the last 5-6 characters, the following would happen:

I can't believe you'vedon

A temporary bypass is to select the characters that you want and delete them all at once.

dessalines commented 2 years ago

This one is really difficult to beat, and incredibly annoying. I think it has something to do with the keyboard settings being messed up / wrong on jetpack-compose. I've tried a lot of ways to disable or mess with the Keyboard settings not working correctly, even after disabling auto-correct:

keyboardOptions = KeyboardOptions.Default.copy(
  capitalization = KeyboardCapitalization.Sentences,
  keyboardType = KeyboardType.Text,
  // autoCorrect = true,
),
Kradyz commented 1 year ago

I agree, I also find this to be a bit of a nuissance!

I have looked a bit into it. I found this answer from stack overflow in which it is pointed out that the setting of autoCorrect = false is not going to have an effect on keyboardType.Text, but it will affect keyboardType.Email and a few others.

This is confirmed in the [documentation on autoCorrect()](https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/KeyboardOptions#autoCorrect()).

I have tested by changing setting

keyboardType = keybordType.Email,
autoCorrect = false

for both lines (here and here)

It does work! I don't know if this is an appropriate solution, as I don't know whether using the 'Email' type instead of the 'Text' type has any undesirable effects. But hopefully this is helpful.

dessalines commented 1 year ago

Thanks! I'll test this to make sure it works as well. Could you comment on that stackoverflow issue, or create a new one, with this answer, for the backspace bug? Its a problem on all my apps that are using jetpack-compose, and there's little documentation about this bug anywhere.

njmdietrich commented 1 year ago

At least on my phone, this issue actually occurs every time I try to delete more than one character in a word. Also, the autocorrect will sometimes get "stuck" if I try to edit a word in the middle of a sentence and subsequently keep editing that word even though I am just trying to continue typing the sentence.

YoteZip commented 1 year ago

I'm still getting this in Jerboa 0.34 when typing with openboard and with the stock AOSP board, same symptoms as everyone else in here and in this issue: https://github.com/dessalines/jerboa/issues/748. I also have the behavior that njmdietrich mentions where it sometimes deletes a word and starts typing in the middle of my post instead of where my cursor is.

Edit: I'm now using the "Liftoff" app instead, almost solely because of this bug. It's just too frustrating when typing out comments. All the apps feel quite new and immature so I look forward to bouncing between them as they mature and I may return to Jerboa later!

shodanx2 commented 1 year ago

Hello, I think I have this issue, it is very hard to describe and it doesn't happen consistently. When going back to fix a typo of change a word and then bringing the cursor back to end of the text. I type something new, it overwrites the last word where I fixed the typo. As if the cursor was still where I fixed the typo and the keyboard was in "insert mode" sometimes each keypress will overwrite one letter of the previously edited word, sometimes the keypress will overwrite the entire word.

Sometimes it does this 3/4 times in a row, it becomes easier to erase all text from the end back to where the typo was, and then rewrite the entire comment.

I think I will just leave all error my errors in because editing my comments before posting is just too frustrating.

It does happen like 1/3 the time that I edit a comment I think.

MarcoHannemann commented 1 year ago

I can confirm both problems with whitespaces lost after hitting backspace and the word removal @shodanx2 mentioned.

asimons04 commented 1 year ago

Same as described above. It's extremely frustrating and pretty much is a dealbreaker for using Jerboa over the PWA.

Curious if it's just AOSP Keyboard that has the issue (that's all I'll use) or if other keyboards have this problem.

MV-GH commented 1 year ago

Some related stuff i found

https://issuetracker.google.com/issues/221636606

https://gitlab.com/LineageOS/issues/android/-/issues/4429

https://issuetracker.google.com/issues/239471016

MV-GH commented 1 year ago

@asimons04 Could i get your exact android version, + keyboard. Or from anyone experiencing this I'm trying to reproduce the issue first.

shodanx2 commented 1 year ago

Screenshot_20230704-050245

Gboard Screenshot_20230704-050428

njmdietrich commented 1 year ago

I am on Lineage for microG 20 (android 13) with the April security update. The keyboard is the AOSP keyboard version 13.

asimons04 commented 1 year ago

@MV-GH

Device 1: OnePlus 3 running LineageOS 18 (Android 9 based) , unknown OpenGapps version, and AOSP keyboard version 9. I do not have an alternate keyboard to test with, but AOSP keyboard behaves as described in this issue when typing text anywhere in Jerboa.

Device 2: Moto G Power (2022) on Android 11 (Stock) and de-Googled best I can. Google Play Services disabled and using AOSP keyboard version 11. Temporarily re-enabling GBoard (Play services remained disabled) and setting that as the default on-screen keyboard, I was able to confirm Jerboa works as expected. AOSP keyboard, though, is as described in this issue.

MV-GH commented 1 year ago

Thanks, I'll see if I can reproduce this

kuro-codes commented 1 year ago

Can confirm for another device: One Plus Nord 2 5G on Android 12. Nothing changed on Google Play Services side. Just installed OpenBoard and using it.

MV-GH commented 1 year ago

Alright can confirm, just installing a OASP keyboard makes it reproducable

t-391 commented 1 year ago

Hello, I can confirm that I have the same issue as described in the original post.

Device: Pixel 4A OS: Lineage 20 (Android 13 Based) Keyboard: AOSP

theshatterstone commented 1 year ago

Hello. I also have the same issue as described in the original post.

Device: Xiaomi Redmi Note 11 Pro 5G (veux) OS: SparkOS Vanilla (No GApps) Keyboard: OpenBoard

MV-GH commented 1 year ago

From my testing disabling show correction suggestions does prevent this from happening. For those wanting a immediate solution. image

shodanx2 commented 1 year ago

This issue has been resolved on my end since I last updated.

It was intermittent but happening often.

I have not had the issue at all since updating despite trying to make it happen.

Can anyone else confirm this is also fixed for you in the last update ?

MV-GH commented 1 year ago

Jerboa update? Android update? keyboard update?

theshatterstone commented 1 year ago

@shodanx2 I still had this issue. Until just now, when @MV-GH 's solution fixed it. It works for me now, but I needed to disable correction suggestions in OpenBoard (I didn't use them anyways so no big deal). So, thanks, @MV-GH, that fixed it. I'm also running the latest versions of Jerboa and OpenBoard from F-Droid, but the issue didn't resolve itself. It only worked properly after @MV-GH's fix

shodanx2 commented 1 year ago

I'm still using gboard, I updated jerboa via fdroid to 0.0.40, it's been fixed since.

MV-GH commented 1 year ago

Gboard never had this issue, are you sure?

shodanx2 commented 1 year ago

We might not have had the exact same issue. Mine would replace whole words after I made a correction earlier in the sentence. I would type just one character at end of the sentence, and the last word I modified would disappear entirely. This may be related to my heavy use of swiping.

In anycase, it was doing it very frequently, now it does not do it at all.

bobdanek commented 1 year ago

Still happening for me on 0.0.41 (GrapheneOS)

MV-GH commented 1 year ago

Yeah it is issue with Compose itself, not something we can fix. All we can do is wait for a fix.

shodanx2 commented 1 year ago

Just updated to 0.0.41 and the very first comment I made, the problem came back!

theshatterstone commented 1 year ago

@shodanx2 I'm using v0.0.41 with OpenBoard and using the fix by @MV-GH and it still works perfectly for me. Have you disabled correction suggestions?

shodanx2 commented 1 year ago

I'm using gboard with default settings, (except for adding a language and enabling swipe)

I don't use lemmy much anymore, however, the problem hasn't happenned since last I reported it.

MV-GH commented 1 year ago

I finally got through to google, https://issuetracker.google.com/issues/294102838 , will monitor what happens

maltfield commented 9 months ago

+1 I've had this issue since I started using Jerboa ~6 months ago. But I'll add that, in addition to spaces suddenly disappearing, sometimes when I try to backspace and correct a mistyped workd, it instead writes over some word that's much earlier, preventing me from being able to type additional words into the message. It's extremely frustrating.

maltfield commented 9 months ago

As others have mentioned this is both extremely frustrating as a user and a developer because it's difficult to reproduce. I was playing around a bit and recorded this example of the bug. Note that when I go to the end of the paragraph and double-tap the enter/newline button on the keyboard, for some reason it replaces a few words back with the newlines.

https://github.com/dessalines/jerboa/assets/5026712/b1911370-e209-41fd-bafb-2d0d2e8bea16

Edit: notice how the word by is still underlined just before it clears it away. So, indeed, it seems that this is a bug with autocorrect. I've moved the cursor forward and I am trying to edit something later, but the word is still "selected" by autocorrect and instead of letting me type where the cursor is placed, it just overrides whatever it was trying to autocorrect before.

maltfield commented 9 months ago

In this screen recording I captured several events where clicking a backspace (or in two instances, typing some other character) caused a bunch of buggy behaviour:

  1. the space between "dust and er" and "y" disappears @ 0:03 when I try to backspace away the "y"
  2. the space between "dust and" and "e" disappears @ 0:03 when I try to backspace away the "e"
  3. the space between "with the" and "win" disappears and "win" becomes "windc" when I only type the letter "c" @ 0:08
  4. the space between "the" and "wind" disappears and "wind" becomes "windm" when I type the character "." @ 0:12
  5. the space between "with" and "thewind" disappears when I backspace the character "d" @ 0:15

The fact that "win" becomes "wind" (and also note the highlighting of the word "_win" that includes the space before the word), does tell me that this is a bug related to autocorrect.

I should note that this bug only exists in Jerboa. I use this same device with this same software keyboard on many other apps, and I've never experienced this in any other app.

Therefore, I think it's clear that this is not an upstream bug. This bug is specific to Jerboa.

https://github.com/dessalines/jerboa/assets/5026712/ed308de1-59d4-4325-9dea-abb99ca031e3

I'm using the built-in default keyboard in LineageOS = Android Keyboard (AOSP)

shodanx2 commented 9 months ago

This was exactly my experience as well. It has something to do with the autocorrect and the space key.

Sometimes adding extra spaces after the corrected word will stop the bug from triggering.

Often, I just erased everything back to the correction. Or I posted without correction but then edited my post. That seemed to reset the bug.

Since my last update, I kicked out google out of my life as much as I could. Now I use the florisboard. Unfortunately, autocorrect is not yet functionnal. I have not observed this bug since.

On Friday, January 5, 2024, Michael Altfield @.***> wrote:

In this screen recording I captured several events where clicking a backspace (or in two instances, typing some other character) caused a bunch of buggy behaviour:

the space between "dust and er" and "y" disappears @ 0:03 when I try to backspace away the "y" the space between "dust and" and "e" disappears @ 0:03 when I try to backspace away the "e" the space between "with the" and "win" disappears and "win" becomes "windc" when I only type the letter "c" @ 0:08 the space between "the" and "wind" disappears and "wind" becomes "windm" when I type the character "." @ 0:12 the space between "with" and "thewind" disappears when I backspace the character "d"

The fact that "win" becomes "wind" (and also note the highlighting of the word "_win" that includes the space before the word, does tell me that this is a bug related to autocorrect.

I should note that this bug only exists in Jebora. I use this same device with this same software keyboard on many other apps, and I've never experienced this in any other app.

https://github.com/dessalines/jerboa/assets/5026712/ed308de1-59d4-4325-9dea-abb99ca031e3

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.< https://ci6.googleusercontent.com/proxy/ta0iMLYRJiZLs4H4EXN7SBzn76TIcFRpn5u8brA2K9EzQgr44EeeXi2ZqwHpxVeSu5cEWkmWzZTJeOWxg_eDUV5jRfMK4BxwJwy0za1SbqiRB-bnAj1gYphYsgJoDIeTCq1xLC24QTpPwdgQ2u1hYa8LhLGjnIBFHvFfX3caM4L8bAugVjKFNinfysjfes6C-0iYrDHw-ksndrmtDnD4RVFhYw-U6xhNWuT_DP6dUA=s0-d-e1-ft#https://github.com/notifications/beacon/ACRBHPOXHVCBNU6LA3ZEGYTYNCI3JA5CNFSM53TFUWF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOOAC66FQ.gif>Message ID: @.***>

maltfield commented 9 months ago

Unfortunately, I've encountered numerous cases where posting and then trying to edit did not "reset" the bug. I was still unable to add content without it overriding a word. What I'd do:

  1. I click the Edit button to edit one of my comments.
  2. I move the keyboard cursor to the end of the text
  3. I type two newline characters to start a new paragraph, and realize it replaced some word in the previous text above with newlines
  4. I backspace away the newlines (that were erroneously added to the wrong location) & re-type the word that the bug deleted
  5. GOTO 2
MV-GH commented 9 months ago

Let me iterate some points I made before:

I should note that this bug only exists in Jebora. I use this same device with this same software keyboard on many other apps, and I've never experienced this in any other app.

  • This is a bug with the core basic text element, and every app made with the Jetpack Compose Toolkit will be affected by it
  • The only known workaround while still using a AOSP keyboard, is by disabling show corrections suggestions setting
  • Any reproductions are not useful here, as the Android engineers that need to read this won't read this issue, instead I suggest you post this to the linked issue.
  • I am aware this issue is extremely annoying, and its even more frustrating that I am unable to fix it due to lacking the required specific domain knowledge. And the realization that this issue will most likely sink in the backlog as it doesn't affect Gboard and thus is not a priority. At this point it is more likely that any of the OASP keyboards apply a workaround.
maltfield commented 9 months ago

@MV-GH sorry but what is Jetpack Compose Toolkit? And how do I find out which of the apps that I have installed use it?

Is Jetpack Compose Toolkit super rare? Because it seems surprising that this ticket hasn't mentioned a single other app that has this issue besides Jerboa.

The only known workaround while still using a AOSP keyboard, is by disabling show corrections suggestions setting

Is there any way to set this on a per-app basis? Because being able to tap suggestions as I type is an extremely useful feature and works great in every app except Jerboa

it doesn't affect Gboard and thus is not a priority

I don't think it's a risk to use software made by Evil Corp if the code is open-source, widespread, and well-reviewed by security researchers. But Isn't Gboard not open-source? I'm not sure that we should be recommending users to use apps with binary blobs, especially ones made by Google.

Are there any FOSS keyboards on F-Droid that allow users to tap a suggestion as they type the word? And to go back after typing a message (during proofread) and tap on a misspelled word and get suggestions?

MV-GH commented 9 months ago

https://developer.android.com/jetpack/compose It is the new way of making Android apps, and is intended to replace the existing traditional view system.

And how do I find out which of the apps that I have installed use it?

https://medium.com/@callmeryan/a-developers-approach-to-identifying-jetpack-compose-usage-in-apps-978601e36de2 This article has some pointers.

Jetpack Compose Toolkit super rare

It is not mature yet, which is probably why it is not popular yet. But compose allows you to build cross platform (iOS, web, Android) apps Which a longterm goal of Jerboa but which is not actively worked toward atm

At the top I mentioned some other issues that had related problems but with other keyboards or specific locales

I'm not sure that we should be recommending users to use apps with binary blobs, especially ones made by Google.

Is this referring to Gboard? I am not recommending it. If you are referring to Jetpack Compose? Then I am sad to inform you that the views system is also built by Google

Btw Element is also moving to Jetpack compose see their new ElementX app https://element.io/labs/element-x https://github.com/element-hq/element-x-android

k4r4b3y commented 1 month ago

Still having this issue. Installed Jerboa on GrapheneOS (latest), from F-droid repo (latest). Quite annoying. Frustrating.

shodanx2 commented 1 month ago

To anyone having this issue, I recommend changing your keyboard to one of the open source one like Florisboard or futo's keyboard

On Saturday, August 24, 2024, Anark Karabey @.***> wrote:

Still having this issue. Installed Jerboa on GrapheneOS (latest), from F-droid repo (latest). Quite annoying. Frustrating.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.< https://ci3.googleusercontent.com/meips/ADKq_NZtFYTiyRd4s22-JIvbO4_cnYVUQPhF2SnsBYnjY2oQJwrh4VfbS-TomlAIhlr9kfEo33JK22kpPVrzwM0X99-Hg7QRuPRjrM3eswvmCeaRrOtJuOIsewigUVQqwcBEy2_QNM-SpRfEBCG_EAsq37DC55bnxlEVwI-hg_AUXfobIE-7DpPIBlPhY8lf_TP715qin9XSX5XbospAsDOQeL6MQQgvPR6RzH7xvZX2HfzpLgs=s0-d-e1-ft#https://github.com/notifications/beacon/ACRBHPPCA4AMTG5HUDP2QPDZTCBQTA5CNFSM53TFUWF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGORGLUM3A.gif>Message ID: @.***>

k4r4b3y commented 1 month ago

@shodanx2 I am having the problem on GrapheneOS and on GrapheneOS's default keyboard.

dessalines commented 1 month ago

@k4r4b3y Could you open up an issue on GrapheneOS's default keyboard? It seems like google has fixed most of these issues for jetpack-compose, and I can't replicate it on most open source keyboards.

I'm going to close this since this wasn't our issue, but something affecting jetpack compose in general.