fix: reset composition state to false on test restart

fixes rare bug where every key press would be considered a dead key
This commit is contained in:
Miodec 2025-01-18 21:29:39 +01:00
parent 5ce574d0cd
commit 05a1272c5c

View file

@ -66,6 +66,7 @@ import {
import * as XPBar from "../elements/xp-bar";
import { getActiveFunboxes } from "./funbox/list";
import { getFunboxesFromString } from "@monkeytype/funbox";
import * as CompositionState from "../states/composition";
let failReason = "";
const koInputVisual = document.getElementById("koInputVisual") as HTMLElement;
@ -265,6 +266,7 @@ export function restart(options = {} as RestartOptions): void {
MemoryFunboxTimer.reset();
QuoteRateModal.clearQuoteStats();
TestUI.reset();
CompositionState.setComposing(false);
if (TestUI.resultVisible) {
if (Config.randomTheme !== "off") {