mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-28 08:43:07 +08:00
fixed layoutfluid not highlighting key after space
This commit is contained in:
parent
1b7bb5b9c8
commit
520f51d251
1 changed files with 19 additions and 15 deletions
|
@ -305,12 +305,14 @@ FunboxList.setFunboxFunctions("layoutfluid", {
|
|||
UpdateConfig.setLayout(layouts[index]);
|
||||
UpdateConfig.setKeymapLayout(layouts[index]);
|
||||
}
|
||||
KeymapEvent.highlight(
|
||||
TestWords.words
|
||||
.getCurrent()
|
||||
.charAt(TestInput.input.current.length)
|
||||
.toString()
|
||||
);
|
||||
setTimeout(() => {
|
||||
KeymapEvent.highlight(
|
||||
TestWords.words
|
||||
.getCurrent()
|
||||
.charAt(TestInput.input.current.length)
|
||||
.toString()
|
||||
);
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
getResultContent(): string {
|
||||
|
@ -318,15 +320,17 @@ FunboxList.setFunboxFunctions("layoutfluid", {
|
|||
},
|
||||
restart(): void {
|
||||
if (this.applyConfig) this.applyConfig();
|
||||
KeymapEvent.highlight(
|
||||
TestWords.words
|
||||
.getCurrent()
|
||||
.substring(
|
||||
TestInput.input.current.length,
|
||||
TestInput.input.current.length + 1
|
||||
)
|
||||
.toString()
|
||||
);
|
||||
setTimeout(() => {
|
||||
KeymapEvent.highlight(
|
||||
TestWords.words
|
||||
.getCurrent()
|
||||
.substring(
|
||||
TestInput.input.current.length,
|
||||
TestInput.input.current.length + 1
|
||||
)
|
||||
.toString()
|
||||
);
|
||||
}, 1);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue