diff --git a/web/src/app/webview/src/contextManager.ts b/web/src/app/webview/src/contextManager.ts index a2450ad58c..be0a9bae5a 100644 --- a/web/src/app/webview/src/contextManager.ts +++ b/web/src/app/webview/src/contextManager.ts @@ -155,6 +155,18 @@ export default class ContextManager extends ContextManagerBase { + /* + this.keyboardCache isn't set until partway through KMW initialization. + Also, keyboard stubs aren't processed until initialization is complete, + so it's best to wait for initialization anyway. + */ + if(!this.engineConfig.deferForInitialization.isFulfilled) { + await this.engineConfig.deferForInitialization.corePromise; + + // Our mobile app-engines all register the stub before attempting to set the keyboard, + // so the Promise ordering here should work in our favor. + } + // If the default keyboard is requested, load that. May vary based on form-factor, which is // part of what .getFallbackStubKey() handles. if(!keyboardId) {