mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-28 09:52:36 +08:00
fix(typing): first space sometimes soft locking the website
This commit is contained in:
parent
0cc1e2a07e
commit
e94b9cb821
2 changed files with 6 additions and 3 deletions
|
|
@ -28,7 +28,6 @@ import * as TestWords from "../test/test-words";
|
|||
import * as Hangul from "hangul-js";
|
||||
import * as CustomTextState from "../states/custom-text-name";
|
||||
import * as FunboxList from "../test/funbox/funbox-list";
|
||||
import * as Settings from "../pages/settings";
|
||||
import * as KeymapEvent from "../observables/keymap-event";
|
||||
import { IgnoredKeys } from "../constants/ignored-keys";
|
||||
import { ModifierKeys } from "../constants/modifier-keys";
|
||||
|
|
@ -193,7 +192,6 @@ function handleSpace(): void {
|
|||
f.functions.handleSpace();
|
||||
}
|
||||
}
|
||||
Settings.groups["layout"]?.updateUI();
|
||||
|
||||
dontInsertSpace = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,12 @@ export default class SettingsGroup<T extends SharedTypes.ConfigValue> {
|
|||
if (this.mode === "select") {
|
||||
const select = document.querySelector(
|
||||
`.pageSettings .section[data-config-name='${this.configName}'] select`
|
||||
) as HTMLSelectElement;
|
||||
) as HTMLSelectElement | null;
|
||||
|
||||
if (select === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
select.value = this.configValue as string;
|
||||
|
||||
//@ts-expect-error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue