mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-24 09:17:42 +00:00
Improves app stability, delays JS calls past page load
This commit is contained in:
parent
e1891b56d2
commit
7b7c93aed4
3 changed files with 16 additions and 2 deletions
|
|
@ -207,7 +207,9 @@ final class KMKeyboard extends WebView {
|
|||
if((keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP && KMManager.InAppKeyboardLoaded) ||
|
||||
(keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM && KMManager.SystemKeyboardLoaded)) {
|
||||
|
||||
if(this.javascriptAfterLoad.size() == 1)
|
||||
// If !this.keyboardSet, then pageLoaded hasn't fired yet.
|
||||
// When pageLoaded fires, it'll call `callJavascriptAfterLoad` safely.
|
||||
if(this.javascriptAfterLoad.size() == 1 && this.keyboardSet)
|
||||
callJavascriptAfterLoad();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -592,7 +592,16 @@ namespace com.keyman.osk {
|
|||
|
||||
// Build a layout using the default for the device
|
||||
if(typeof layout != 'object' || layout == null) {
|
||||
let kbdDevVersion = new utils.Version(activeKeyboard['KVER']);
|
||||
var kbdDevVersion: utils.Version;
|
||||
|
||||
// This CAN be called with no backing keyboard; KMW will try to force-show
|
||||
// the OSK even without a backing keyboard on mobile, using the default
|
||||
// layout as the OSK's base.
|
||||
if(activeKeyboard) {
|
||||
kbdDevVersion = new utils.Version(activeKeyboard['KVER']);
|
||||
} else {
|
||||
kbdDevVersion = utils.Version.CURRENT;
|
||||
}
|
||||
layout=Layouts.buildDefaultLayout(PVK, kbdDevVersion, kbdBitmask, formFactor);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ namespace com.keyman.utils {
|
|||
// as it results in unexpected, bug-like behavior for keyboard designers when it is unwanted.
|
||||
public static readonly NO_DEFAULT_KEYCAPS = new Version([12, 0]);
|
||||
|
||||
// Corresponds to the most recent known version of KMW and Keyman Developer.
|
||||
public static readonly CURRENT = new Version([12, 0]);
|
||||
|
||||
private readonly components: number[]
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue