Fixes: #16335
The new unit tests here caught the behavior addressed by this PR's predecessor, #16349.
Meanwhile, a _different_ behavior was noted here that had added complexity - it so happens the test case I constructed managed to catch a bug in backspace handling! Fortunately, a small tweak was able to resolve the issue.
Build-bot: skip build:web
Test-bot: skip
Build-bot: skip release:web release:android
Relates-to: #16254
Relates-to: #16313
Noting that similar issues to those fixed by #16313 have occurred in other gesture-related contexts, it seems wise to implement the same sort of fix for all gesture types - perhaps the Android WebView has its own circumstances where similar "reference replacements" may occur and throw off our internal key-matching logic.
Fixes: #16254
While I have not been able to find a definitive online reference, it appears that the key-spec instance attached to OSK elements may be replaced within the iOS Safari-based WebView despite no re-assignment existing within Keyman Engine for Web code.
The references should not change under any condition, but it appears that something external within the iOS WebView causes this anyway. Fortunately, we can still check against the unique element ID, which provides a way around this issue.
Build-bot: skip release:web release:ios
refactor(web): fix return type of `currentKeyboardSrcTextStore`
`currentKeyboardSrcTextStore` can return `null` if the global `textStore` should be used. This change reflects this in the return type.
`currentKeyboardSrcTextStore` can return `null` if the global
`textStore` should be used. This change reflects this in the return
type.
Build-bot: skip build:web
Test-bot: skip
fix(android): show updates for lexical models
With this change the model info activity will show an available update to the lexical model.
PR partially drafted by AI (Gemini 3 Flash Preview).
Fixes: #16226
chore(web): fire `keyboardloaded` event only once per keyboard
Previously we fired `keyboardloaded` twice for each loaded keyboard. This change fixes this.
Fixes: #16292
Adds unit tests to cover context-reset patterns
and to ensure that transition IDs are always set
properly on generated suggestions, for all model
types.
Build-bot: skip build:web
Test-bot: skip
maint(android): update Android Target API to 36
This change updates the Android Target API to 36 to satisfy the upcoming annual Play Store Aug 31 requirement. It updates Keyman for Android to use API level 36 by changing the compileSdk and targetSdkVersion properties to 36.
Changes made by AI (Gemini 3 Flash Preview).
Fixes: #16279
Before epic/autocorrect, input of a pure backspacing transform would perform special operations within the predictive-text worker, reconstructing the remainder of the token and erasing fat-finger data. This PR fixes the regression.
This is notably useful when attempting to erase part of an applied suggestion, as applied suggestions wholesale-replace the original versions of affected tokens with a single transform input. Backspacing into the transform will then break that unitary transform into pieces better suited for ongoing predictive-text operations.
Build-bot: skip build:web build:android