keyman icon indicating copy to clipboard operation
keyman copied to clipboard

bug(android): At start of input, pressing globe key, going back, leads to stuck shift key

Open mcdurdin opened this issue 2 years ago • 9 comments

Describe the bug

From a team review of the Keyman for Android UX (#7161)

When I was at start-of-sentence, I pressed globe key, went back, then keyboard was lower case, predictions showed Title Case, but the Shift key did not work -- the shift layer would not be activated.

https://user-images.githubusercontent.com/4498365/187527077-d54b68c1-3486-43ea-a253-89417f527700.mp4

Also documented at https://community.software.sil.org/t/locked-on-one-layer-or-dancing-between-two-layers/6446

Note:

  • repro on 15.0.268-stable, 16.0.37-alpha. also repro on 15.0.269.
  • per @jahorton: Does not appear to repro in iOS, though I only tried the once. (Multiple kbds installed, 15.0.268-stable)

Keyman for Windows/macOS/Linux/iPhone/iPad/Android:

  • Device: Samsung A90 5G
  • OS: Android 12
  • Keyman version: 15.0.269-stable

mcdurdin avatar Aug 30 '22 19:08 mcdurdin

Noting this needs sil_euro_latin version 2.0 for the start-of-sentence. I still haven't been able to repro with 16.0.54 alpha. When I exit the keyboard picker, there's a lot of flicker but the OSK ends up in the shift layer

darcywong00 avatar Sep 01 '22 04:09 darcywong00

I still haven't been able to repro with 16.0.54 alpha.

Me either. I can repro with 15.0.269. So what's changed between then and now? I guess we need to bisect? So #7156 doesn't fix this one, but looks like something else does?

mcdurdin avatar Sep 01 '22 04:09 mcdurdin

For alpha I've traced the repro to 16.0.42 - fail (shift key doesn't work after globe) 16.0.43 - pass (shift key works after globe) Note, even though initially the start-of-sentence start with shift layer, the suggestions are still lower-cased in the banner

I'm going to try to :cherries:-pick #6787 to stable-15.0 see if that's the fix.

darcywong00 avatar Sep 02 '22 03:09 darcywong00

Good work. Was just looking at list of fixes in 16.0.43. Listing them here for completeness:

  • #7024
  • #7027
  • #7023
  • #7018
  • #6787
  • #6979

So it should be one of those I guess: #6787 or #6979. The other four are definitely unrelated. Agree with you that #6787 seems very likely to have fixed it; it certainly has some interactions with the globe key. If you are able to confirm the fix against stable-15.0, then I would like to get @jahorton's feedback on root cause of the problem described here in #7169 on the basis of how it is fixed by #6787.

mcdurdin avatar Sep 02 '22 05:09 mcdurdin

I'm a bit concerned that the 'fix' in #7188 is likely coincidental - the true cause of the bug is likely still in place, but just avoided by this 🍒-pick as it works around the issue.

It's unclear from the video whether or not you left the globe menu by cancelling (without selecting the keyboard) or if you reselected it; there's a slim chance that may have mattered. Either way, it's clear that exiting the menu did reload the OSK completely (which will be neutered by the 🍒-pick - that should also make people a bit happy, as it's the cause of the "flicker").

I can't see what the original, true cause of the bug might be without "diving into the code", so to speak, so given my prescribed priorities at the moment, I'll have to leave it at this for now.

jahorton avatar Sep 06 '22 03:09 jahorton

It's unclear from the video whether or not you left the globe menu by cancelling (without selecting the keyboard) or if you reselected it; there's a slim chance that may have mattered.

In the attached video, I left the globe menu by clicking the < back button -- cancelling.

I agree that this fix is concidental. I suggest we leave this issue open after merging the fix for further exploration of root cause (which may involve more investigation and debugging against a known-bad version of Keyman...)

mcdurdin avatar Sep 06 '22 20:09 mcdurdin

This behavior is reproducible in 15.0.269-stable, but not in 16.0.60-alpha, on Android 5.0 (API 21), 8.1 (API 27) and 12.0 (API 31).

MakaraSok avatar Sep 12 '22 07:09 MakaraSok

This behavior is reproducible in 15.0.269-stable, but not in 16.0.60-alpha, on Android 5.0 (API 21), 8.1 (API 27) and 12.0 (API 31).

~The fix should appear in the next 15.0 build (15.0.270) when it's available~

Doh - #7188 wasn't merged due to failing test. So it might be the next 15.0 build (~271) whenever that happens.

darcywong00 avatar Sep 12 '22 08:09 darcywong00

Ah oh dear I forgot that this one didn't get merged -- and asked a community forum member to re-test with 15.0.270...

mcdurdin avatar Sep 14 '22 04:09 mcdurdin

Closing as fixed in 15.0.271

mcdurdin avatar Oct 16 '22 23:10 mcdurdin

Verified at https://community.software.sil.org/t/locked-on-one-layer-or-dancing-between-two-layers/6446/12.

MakaraSok avatar Oct 21 '22 03:10 MakaraSok