From 924e761b295d3bea6058fd7a9c91b20ccf178aed Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Fri, 3 Nov 2023 09:39:29 +0700 Subject: [PATCH] change(web): remembered that the outputTarget.restoreTo func exists --- common/web/input-processor/src/text/inputProcessor.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/web/input-processor/src/text/inputProcessor.ts b/common/web/input-processor/src/text/inputProcessor.ts index 88e95ae7e6d..76d8b288f42 100644 --- a/common/web/input-processor/src/text/inputProcessor.ts +++ b/common/web/input-processor/src/text/inputProcessor.ts @@ -107,12 +107,8 @@ export default class InputProcessor { if(keyEvent.baseTranscriptionToken) { const transcription = this.contextCache.get(keyEvent.baseTranscriptionToken); if(transcription) { - const rewindingTransform = transcription.preInput.buildTransformFrom(outputTarget); - outputTarget.apply(rewindingTransform); - - // For multitaps, we must also restore the original deadkeys. - outputTarget.deadkeys().clear(); - transcription.preInput.deadkeys().dks.forEach((dk) => outputTarget.deadkeys().add(dk)); + // Restores full context, including deadkeys in their exact pre-keystroke state. + outputTarget.restoreTo(transcription.preInput); } else { console.warn('The base context for the multitap could not be found'); }