Skip to content

Commit

Permalink
change(web): remembered that the outputTarget.restoreTo func exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed Nov 3, 2023
1 parent fd585e5 commit 924e761
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions common/web/input-processor/src/text/inputProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 924e761

Please sign in to comment.