Fixes#6455.
This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.
Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.
I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
Fixes#6489.
The issue arose in multitap scenarios, where the tip display state
became desynchronised with the actual display state as maintained in
the Android code.
The fix I applied was to reduce some of the state checks into the js
wrapper android-host.js. This is not ideal. The state machine for key
tip display is scattered across four functions in three files:
* visualKeyboard.ts: VisualKeyboard.highlightKey
* visualKeyboard.ts: VisualKeyboard.showKeyTip
* embedded/keytip.ts: KeyTip.show
* android-host.js: oskShowKeyPreview / oskClearKeyPreview
I have moved the actual re-creation check for the tip to the lowest
level functions -- those in android-host.js. But a more detailed look at
the state machine and a refactoring would certainly be worthwhile.
Fixes#6455.
This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.
Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.
I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
This is a follow-up for #6331. We still did not have enough detail to
be able to trace the root cause of the load errors. This adds a little
more diagnostics.
While this was done in code as a global override, probably following
Apple stylistic changes, it is better to leave this to the keyboard
developer to decide on.
Adjusts the dimensions to use pixel boundaries to prevent antialiasing
for some of the key preview and longpress popups, and adjusts horizontal
positioning of key preview to center more precisely, for iOS.
Observed while debugging another issue on iOS. The
VisualKeyboard.waitForFonts function sets up a busy timer to wait for
font loading. This functionality is not even needed on the iOS app,
because it's really only used for the touch alias elements.
However, it was being called, potentially multiple times, leading to the
timer never being removed. On Android, the timer was correctly removed.
This aligns the iOS code path with the Android code path.
Fixes#5942.
The touch alias element position was not consistent across all browsers,
leading to misalignment in some situations. Identified missing CSS to
make the positioning consistent, as far as I can tell, which led to the
additional benefit of reducing the per-browser special cases.