Skip to content

Commit

Permalink
fix: reset composition state to false on test restart
Browse files Browse the repository at this point in the history
fixes rare bug where every key press would be considered a dead key
  • Loading branch information
Miodec committed Jan 18, 2025
1 parent 5ce574d commit 05a1272
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/ts/test/test-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 05a1272

Please sign in to comment.