mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 02:39:05 +08:00
fix(commandline): running wrong command on mobile or when not moving the mouse
closes #6037
This commit is contained in:
parent
527d65702a
commit
e21a205c0a
1 changed files with 4 additions and 0 deletions
|
|
@ -430,7 +430,11 @@ async function showCommands(): Promise<void> {
|
|||
await updateActiveCommand();
|
||||
});
|
||||
command.addEventListener("click", async () => {
|
||||
const previous = activeIndex;
|
||||
activeIndex = parseInt(command.getAttribute("data-index") ?? "0");
|
||||
if (previous !== activeIndex) {
|
||||
await updateActiveCommand();
|
||||
}
|
||||
await runActiveCommand();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue