Skip to content

Commit 05a1272

Browse files
committed
fix: reset composition state to false on test restart
fixes rare bug where every key press would be considered a dead key
1 parent 5ce574d commit 05a1272

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frontend/src/ts/test/test-logic.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import {
6666
import * as XPBar from "../elements/xp-bar";
6767
import { getActiveFunboxes } from "./funbox/list";
6868
import { getFunboxesFromString } from "@monkeytype/funbox";
69+
import * as CompositionState from "../states/composition";
6970

7071
let failReason = "";
7172
const koInputVisual = document.getElementById("koInputVisual") as HTMLElement;
@@ -265,6 +266,7 @@ export function restart(options = {} as RestartOptions): void {
265266
MemoryFunboxTimer.reset();
266267
QuoteRateModal.clearQuoteStats();
267268
TestUI.reset();
269+
CompositionState.setComposing(false);
268270

269271
if (TestUI.resultVisible) {
270272
if (Config.randomTheme !== "off") {

0 commit comments

Comments
 (0)