keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
372 stars 102 forks source link

fix(android): prevents mid-keystroke desynchronization when deleting selected text #11367

Closed jahorton closed 1 week ago

jahorton commented 1 week ago

Fixes #11337.

It turns out that in the middle of updating Android context after a keystroke, we were triggering a selection-change before the batch-edit process was complete - though only if there was selected text. It's not clear why that one branch was left out of the "ignore selection change" mode, but including it is enough to fix the issue.

Refer to #8611 and #8682 for related historical context.

User Testing

TEST_REPRO: Using an up-to-date version of Android, attempt to reproduce the base issue (#11337).

  1. Open Keyman In-app.
  2. Type a sentence (eg., All things are beautiful)
  3. Select the last word 'beautiful'.
  4. Press Backspace key to delete that word.
  5. Type the text 'ha..' (eg.,happen)

Verify that predictive text operates normally, instead of breaking as it did in #11337.

keymanapp-test-bot[bot] commented 1 week ago

User Test Results

Test specification and instructions

Test Artifacts

mcdurdin commented 1 week ago

Test Results

keyman-server commented 1 week ago

Changes in this pull request will be available for download in Keyman version 17.0.320-beta