From 5cd3dee12535c41501e509df4b1bc5080bb602ff Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Sat, 4 Mar 2023 09:52:37 +0700 Subject: [PATCH] chore(web): addendum to prior commit --- web/src/engine/main/src/keyboardInterface.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/engine/main/src/keyboardInterface.ts b/web/src/engine/main/src/keyboardInterface.ts index 49bce67fb0..3c5e6f8425 100644 --- a/web/src/engine/main/src/keyboardInterface.ts +++ b/web/src/engine/main/src/keyboardInterface.ts @@ -24,18 +24,16 @@ export default class KeyboardInterface extends KeyboardInterfaceBase { } registerKeyboard(Pk): void { - const priorActiveKeyboard = this.activeKeyboard; - // Among other things, sets Pk as a newly-active Keyboard. super.registerKeyboard(Pk); - const registeredKeyboard = this.activeKeyboard; + const registeredKeyboard = this.loadedKeyboard; const cacheEntry = this.stubAndKeyboardCache.getKeyboard(registeredKeyboard.id); if(!(cacheEntry instanceof Promise)) { // Deliberate keyboard pre-loading via direct script-tag link on the page. - // Just load the keyboard and set our field back in place. + // Just load the keyboard and reset the harness's keyboard-receiver field. this.stubAndKeyboardCache.addKeyboard(new Keyboard(Pk)); - this.activeKeyboard = priorActiveKeyboard; + this.loadedKeyboard = null; } }